/* The function initializeSeed may be used to set the seed for the random integer generator to a specific value. From then on, the sequence of random integers will be determined by the seed. The seed should be an
odd positive integer, since the modulus is a power of 2. */
void initializeSeed( unsignedlong newSeed) /* The new value for the seed. */
{
seed = newSeed;
}
/* The function randInteger returns a pseudo-random integer in a given range. The technique is adapted from the book "Assembler Language for Fortran, Cobol, and PL/1 Programmers" by Shan S. Kuo, pages 106-107. It is designed for speed of computation rather than degree of randomness. It assumes type long is 32 bits and that, in multiplying unsigned long integers,
excess bits on the left are discarded. */
Unsigned randInteger( Unsigned lowerBound, /* Lower bound for range of random integer. */ Unsigned upperBound) /* Upper bound for range of random integer. */
{
seed = (seed * multiplier) & 0x7fffffff; return lowerBound + (seed >> 7) % (upperBound - lowerBound + 1);
}
/* The function randGroupWord returns newly allocated word in the strong generators of a group, representing a pseudo-random element of the
stabilizer in the group of a designated number of base points. */
Word *randGroupWord( const PermGroup *const G, Unsigned atLevel)
{
Word *w = newTrivialWord(); Unsigned level, pt;
Permutation **svec;
/* The function randGroupPerm returns a newly allocated pseudo-random permutation in the stabilizer of an initial segment of the base in a permutation group. The inverse image field of the permutation is filled
in. */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.