#include <randomgenerator.h>
|
static void | setGeneratorType (const ERandomGenerators gen) |
| set the type of the random generator that should be used. More...
|
|
static void | debugState (int &rIndex, int &rGeneration, int &rRefillCount) |
|
static int | debugNRandomNumbers () |
|
static void | checkGenerator () |
| call this function to check if we need to create new random numbers. More...
|
|
static void | setup (const ERandomGenerators gen, const unsigned oneSeed) |
|
static void | seed (const unsigned oneSeed) |
| set a random generator seed. If oneSeed is 0, then a random number (provided by system time) is used as initial seed. More...
|
|
static double | rand () |
| get a random value from [0., 1.] More...
|
|
static double | rand (const double max_value) |
|
static unsigned long | randInt () |
| get a random integer in [0,2^32-1] More...
|
|
static unsigned long | randInt (const int max_value) |
|
static double | randNorm (const double mean, const double stddev) |
| Access to nonuniform random number distributions. More...
|
|
◆ ERandomGenerators
Enumerator |
---|
ergMersenneTwister | |
ergWellRNG512 | |
ergXORShift96 | |
ergFastRandom | |
◆ RandomGenerator()
RandomGenerator::RandomGenerator |
( |
| ) |
|
|
inline |
◆ checkGenerator()
static void RandomGenerator::checkGenerator |
( |
| ) |
|
|
inlinestatic |
call this function to check if we need to create new random numbers.
this function is not reentrant! (e.g. call every year in the model)
◆ debugNRandomNumbers()
static int RandomGenerator::debugNRandomNumbers |
( |
| ) |
|
|
inlinestatic |
◆ debugState()
static void RandomGenerator::debugState |
( |
int & |
rIndex, |
|
|
int & |
rGeneration, |
|
|
int & |
rRefillCount |
|
) |
| |
|
inlinestatic |
◆ rand() [1/2]
static double RandomGenerator::rand |
( |
| ) |
|
|
inlinestatic |
get a random value from [0., 1.]
◆ rand() [2/2]
static double RandomGenerator::rand |
( |
const double |
max_value | ) |
|
|
inlinestatic |
◆ randInt() [1/2]
static unsigned long RandomGenerator::randInt |
( |
| ) |
|
|
inlinestatic |
get a random integer in [0,2^32-1]
◆ randInt() [2/2]
static unsigned long RandomGenerator::randInt |
( |
const int |
max_value | ) |
|
|
inlinestatic |
◆ randNorm()
double RandomGenerator::randNorm |
( |
const double |
mean, |
|
|
const double |
stddev |
|
) |
| |
|
inlinestatic |
Access to nonuniform random number distributions.
◆ seed()
void RandomGenerator::seed |
( |
const unsigned |
oneSeed | ) |
|
|
static |
set a random generator seed. If oneSeed is 0, then a random number (provided by system time) is used as initial seed.
◆ setGeneratorType()
set the type of the random generator that should be used.
◆ setup()
static void RandomGenerator::setup |
( |
const ERandomGenerators |
gen, |
|
|
const unsigned |
oneSeed |
|
) |
| |
|
inlinestatic |
The documentation for this class was generated from the following files: