Changeset d2b2a7 in git for Singular/LIB/random.lib


Ignore:
Timestamp:
May 5, 1998, 1:55:40 PM (26 years ago)
Author:
Kai Krüger <krueger@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
97f92aa6d280f6022eaae47195ccc02503ccb984
Parents:
4996f5286c7671191ad22e654499fd8b752fe4f0
Message:
Modified Files:
	libparse.l utils.cc LIB/classify.lib LIB/deform.lib
	LIB/elim.lib LIB/factor.lib LIB/fastsolv.lib LIB/finvar.lib
	LIB/general.lib LIB/hnoether.lib LIB/homolog.lib LIB/inout.lib
	LIB/invar.lib LIB/makedbm.lib LIB/matrix.lib LIB/normal.lib
	LIB/poly.lib LIB/presolve.lib LIB/primdec.lib LIB/primitiv.lib
	LIB/random.lib LIB/ring.lib LIB/sing.lib LIB/standard.lib
	LIB/tex.lib LIB/tst.lib
Changed help section o procedures to have an quoted help-string between
proc-definition and proc-body.


git-svn-id: file:///usr/local/Singular/svn/trunk@1601 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/random.lib

    r4996f52 rd2b2a7  
    1 // $Id: random.lib,v 1.4 1998-04-03 22:47:12 krueger Exp $
     1// $Id: random.lib,v 1.5 1998-05-05 11:55:36 krueger Exp $
    22//system("random",787422842);
    33//(GMG/BM, last modified 22.06.96)
    44///////////////////////////////////////////////////////////////////////////////
    55
    6 version="$Id: random.lib,v 1.4 1998-04-03 22:47:12 krueger Exp $";
     6version="$Id: random.lib,v 1.5 1998-05-05 11:55:36 krueger Exp $";
    77info="
    88LIBRARY:  random.lib    PROCEDURES OF RANDOM MATRIX AND POLY OPERATIONS
     
    2323
    2424proc genericid (id, list #)
    25 USAGE:   genericid(id,[,p,b]);  id ideal/module, k,p,b integers
     25"USAGE:   genericid(id,[,p,b]);  id ideal/module, k,p,b integers
    2626RETURN:  system of generators of id which are generic, sparse, triagonal linear
    2727         combinations of given generators with coefficients in [1,b] and
     
    2929NOTE:    For performance reasons try small bound b in characteristic 0
    3030EXAMPLE: example genericid; shows an example
     31"
    3132{
    3233//----------------------------- set defaults ----------------------------------
     
    5051
    5152proc randomid (id, list #)
    52 USAGE:   randomid(id,[k,b]);  id ideal/module, b,k integers
     53"USAGE:   randomid(id,[k,b]);  id ideal/module, b,k integers
    5354RETURN:  ideal/module having k generators which are random linear combinations
    5455         of generators of id with coefficients in the interval [-b,b]
     
    5657NOTE:    For performance reasons try small bound b in characteristic 0
    5758EXAMPLE: example randomid; shows an example
     59"
    5860{
    5961//----------------------------- set defaults ----------------------------------
     
    7678
    7779proc randommat (int n, int m, list #)
    78 USAGE:   randommat(n,m[,id,b]);  n,m,b integers, id ideal
     80"USAGE:   randommat(n,m[,id,b]);  n,m,b integers, id ideal
    7981RETURN:  nxm matrix, entries are random linear combinations of elements
    8082         of id and coefficients in [-b,b]
     
    8284NOTE:    For performance reasons try small bound b in char 0
    8385EXAMPLE:  example randommat; shows an example
     86"
    8487{
    8588//----------------------------- set defaults ----------------------------------
     
    109112
    110113proc sparseid (int k, int u, list #)
    111 USAGE:   sparseid(k,u[,o,p,b]);  k,u,o,p,b integers
     114"USAGE:   sparseid(k,u[,o,p,b]);  k,u,o,p,b integers
    112115RETURN:  ideal having k generators in each degree d, u<=d<=o, p percent of
    113116         terms in degree d are 0, the remaining have random coefficients
    114117         in the interval [1,b], (default: o=u=d, p=75, b=30000)
    115118EXAMPLE: example sparseid; shows an example
     119"
    116120{
    117121//----------------------------- set defaults ----------------------------------
     
    138142
    139143proc sparsemat (int n, int m, list #)
    140 USAGE:   sparsemat(n,m[,p,b]);  n,m,p,b integers
     144"USAGE:   sparsemat(n,m[,p,b]);  n,m,p,b integers
    141145RETURN:  nxm integer matrix, p percent of the entries are 0, the remaining
    142146         are random coefficients >=1 and <= b; [defaults: (p,b) = (75,1)]
    143147EXAMPLE: example sparsemat; shows an example
     148"
    144149{
    145150   int r,h,ii;
     
    184189
    185190proc sparsepoly (int u, list #)
    186 USAGE:   sparsepoly(u[,o,p,b]);  u,o,p,b integers
     191"USAGE:   sparsepoly(u[,o,p,b]);  u,o,p,b integers
    187192RETURN:  poly having only terms in degree d, u<=d<=o, p percent of the terms
    188193         in degree d are 0, the remaining have random coefficients in [1,b),
    189194         (defaults: o=u=d, p=75, b=30000)
    190195EXAMPLE:  example sparsepoly; shows an example
     196"
    191197{
    192198//----------------------------- set defaults ----------------------------------
     
    209215
    210216proc sparsetriag (int n, int m, list #)
    211 USAGE:   sparsetriag(n,m[,p,b]);  n,m,p,b integers
     217"USAGE:   sparsetriag(n,m[,p,b]);  n,m,p,b integers
    212218RETURN:  nxm lower triagonal integer matrix, diagonal entries equal to 1, about
    213219         p percent of lower diagonal entries are 0, the remaining are random
    214220         integers >=1 and <= b; [defaults: (p,b) = (75,1)]
    215221EXAMPLE: example sparsetriag; shows an example
     222"
    216223{
    217224   int ii,min,l,r; intmat M[n][m];
Note: See TracChangeset for help on using the changeset viewer.