Loading...
Searching...
No Matches
Random Class Reference
Detailed DescriptionRandom numbers. Class Random provides random Real variables, i.e. a value variable that gives another value each time it is accessed. It may be used just like an ordinary Real by means of an overloaded cast operator Real()%. This is an implementation of KISS random number generator developed by George Marsaglia. KISS is combination of three different random number generators:
KISS has a period of 2^123 and passes all statistical test part of BigCrush-Test of TestU01 [1]. Constructor & Destructor Documentation◆ Random()
default constructor. Constructs a new (pseudo) Random variable using Definition at line 162 of file random.h. References Random::setSeed(). ◆ ~Random()Member Function Documentation◆ getSeed()
returns the initial seed shift Definition at line 122 of file random.h. References Random::seedshift. ◆ next()returns next random number. Definition at line 111 of file random.h. References Random::next_random(). ◆ next_random()
executes KISS random number generator and returns a pseudo random Real value in [0,1]. Definition at line 83 of file random.h. References Random::cst_seed, Random::lin_seed, Random::mwc_seed, SOPLEX_RADD, SOPLEX_RSTEP, and Random::xor_seed. Referenced by Random::next(), and Random::setSeed(). ◆ setSeed()
initialize all seeds of the random number generator. Definition at line 133 of file random.h. References Random::cst_seed, Random::lin_seed, Random::mwc_seed, Random::next_random(), Random::seedshift, SOPLEX_DEFAULT_CST, SOPLEX_DEFAULT_LIN, SOPLEX_DEFAULT_MWC, SOPLEX_DEFAULT_XOR, SOPLEX_MAX, and Random::xor_seed. Referenced by Random::Random(). Member Data Documentation◆ cst_seed
random seed shifted for mwc_seed. Definition at line 76 of file random.h. Referenced by Random::next_random(), and Random::setSeed(). ◆ lin_seed
random seed for linear congruential RNS. Definition at line 73 of file random.h. Referenced by Random::next_random(), and Random::setSeed(). ◆ mwc_seed
random seed Multiple-with-carry RNS. Definition at line 75 of file random.h. Referenced by Random::next_random(), and Random::setSeed(). ◆ seedshift
initial shift for random seeds. Definition at line 72 of file random.h. Referenced by Random::getSeed(), and Random::setSeed(). ◆ xor_seed
random seed for XOR-shift RNS. Definition at line 74 of file random.h. Referenced by Random::next_random(), and Random::setSeed().
|