Provides random number generators. More...
Functions | |
double | ogdf::randomDouble (double low, double high) |
Returns a random double value from the interval [low , high ). More... | |
double | ogdf::randomDoubleExponential (double beta) |
Returns a random double value from the exponential distribution. More... | |
double | ogdf::randomDoubleNormal (double m, double sd) |
Returns a random double value from the normal distribution with mean m and standard deviation sd. More... | |
int | ogdf::randomNumber (int low, int high) |
Returns random integer between low and high (including). More... | |
long unsigned int | ogdf::randomSeed () |
Returns a random value suitable as initial seed for a random number engine. More... | |
void | ogdf::setSeed (int val) |
Sets the seed for functions like randomSeed(), randomNumber(), randomDouble(). More... | |
Provides random number generators.
double ogdf::randomDouble | ( | double | low, |
double | high | ||
) |
Returns a random double value from the interval [low
, high
).
This functions is thread-safe.
double ogdf::randomDoubleExponential | ( | double | beta | ) |
Returns a random double value from the exponential distribution.
This functions is thread-safe.
|
inline |
int ogdf::randomNumber | ( | int | low, |
int | high | ||
) |
Returns random integer between low and high (including).
This functions is thread-safe.
long unsigned int ogdf::randomSeed | ( | ) |
Returns a random value suitable as initial seed for a random number engine.
This functions is thread-safe.
void ogdf::setSeed | ( | int | val | ) |
Sets the seed for functions like randomSeed(), randomNumber(), randomDouble().