/* The function initializeSeed may be used to set the seed for the random integergeneratortoaspecificvalue.Fromthenon,thesequenceof randomintegerswillbedeterminedbytheseed.Theseedshouldbean
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. Thetechniqueisadaptedfromthebook"AssemblerLanguageforFortran, Cobol,andPL/1Programmers"byShanS.Kuo,pages106-107.Itisdesigned forspeedofcomputationratherthandegreeofrandomness.Itassumes typelongis32bitsandthat,inmultiplyingunsignedlongintegers,
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 generatorsofagroup,representingapseudo-randomelementofthe
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 permutationinthestabilizerofaninitialsegmentofthebaseina permutationgroup.Theinverseimagefieldofthepermutationisfilled
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.