Rand48¶
The Rand48
class is a fast pseudo-random number generator based on
the C Standard Library functions erand48(), nrand48() & company. It
generates a uniformly distributed sequence.
-
class
Rand48
¶ Random-number generator based on the C Standard Library functions erand48(), nrand48() & company; generates a uniformly distributed sequence.
Public Functions
-
Rand48
(unsigned long int seed = 0)¶ Constructor.
-
void
init
(unsigned long int seed)¶ Re-initialize with a given seed.
-
bool
nextb
()¶ Get the next value in the sequence (range: [false, true])
-
long int
nexti
()¶ Get the next value in the sequence (range: [0 … 0x7fffffff])
-
double
nextf
()¶ Get the next value in the sequence (range: [0 … 1[)
-
double
nextf
(double rangeMin, double rangeMax)¶ Get the next value in the sequence (range [rangeMin … rangeMax[)
-