Changeset 3754ca in git for Singular/LIB/random.lib
- Timestamp:
- Apr 15, 2009, 1:28:08 PM (15 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- a6606e6cba9689ecbcc4e27ac00fb8c1deabd128
- Parents:
- 40c648539a84cb2dc36e46b6b6c84deeb21e393b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/random.lib
r40c648 r3754ca 1 1 //(GMG/BM, last modified 22.06.96) 2 2 /////////////////////////////////////////////////////////////////////////////// 3 version="$Id: random.lib,v 1. 19 2009-04-14 12:00:14 SingularExp $";3 version="$Id: random.lib,v 1.20 2009-04-15 11:18:27 seelisch Exp $"; 4 4 category="General purpose"; 5 5 info=" … … 154 154 proc sparseHomogIdeal (int k, int u, list #) 155 155 "USAGE: sparseid(k,u[,o,p,b]); k,u,o,p,b integers 156 RETURN: ideal having k homogeneous generators, each of random degree in the 157 interval [u,o], p percent of terms in degree d are 0, the remaining 158 have random coefficients in the interval [1,b], (default: o=u, p=75, 156 RETURN: ideal having k homogeneous generators, each of random degree in the 157 interval [u,o], p percent of terms in degree d are 0, the remaining 158 have random coefficients in the interval [1,b], (default: o=u, p=75, 159 159 b=30000) 160 160 EXAMPLE: example sparseid; shows an example … … 172 172 { 173 173 id = maxideal(random(u, o)); // monomial basis of some degree 174 m = sparsemat(size(id),1,p,b); // random coefficients 174 m = sparsemat(size(id),1,p,b); // random coefficients 175 175 i[ii] = (matrix(id)*m)[1,1]; 176 176 } … … 278 278 proc sparsepoly (int u, list #) 279 279 "USAGE: sparsepoly(u[,o,p,b]); u,o,p,b integers 280 RETURN: poly having only terms in degree d, u<=d<=o, p percent of the terms280 RETURN: poly having only terms in degree d, u<=d<=o, p percentage of the terms 281 281 in degree d are 0, the remaining have random coefficients in [1,b), 282 282 (defaults: o=u, p=75, b=30000)
Note: See TracChangeset
for help on using the changeset viewer.