Implements a 32-bit (2^31-2 cycle length) linear congruential random number generator. More...
#include <clcg32.h>
Public Member Functions | |
virtual void | initialize (int seedSet, int rngId, int numRngs, int parsimProcId, int parsimNumPartitions, cConfiguration *cfg) |
virtual void | selfTest () |
virtual unsigned long | intRand () |
virtual unsigned long | intRandMax () |
virtual unsigned long | intRand (unsigned long n) |
virtual double | doubleRand () |
virtual double | doubleRandNonz () |
virtual double | doubleRandIncl1 () |
Implements a 32-bit (2^31-2 cycle length) linear congruential random number generator.
Source: Raj Jain: The Art of Computer Systems Performance Analysis (John Wiley & Sons, 1991) pp 441-444, 455.
virtual void cLCG32::initialize | ( | int | seedSet, | |
int | rngId, | |||
int | numRngs, | |||
int | parsimProcId, | |||
int | parsimNumPartitions, | |||
cConfiguration * | cfg | |||
) | [virtual] |
Sets up the RNG.
Implements cRNG.