KrisLibrary
1.0.0
|
Defines a standard method for random floating-point number generation. More...
Go to the source code of this file.
Namespaces | |
Math | |
Contains all definitions in the Math package. | |
Functions | |
template<class RNG > | |
float | frand_gaussian (RNG &rng) |
template<class RNG > | |
double | drand_gaussian (RNG &rng) |
void | Math::Srand (unsigned long seed) |
long int | Math::RandInt () |
Generates a random int. | |
long int | Math::RandInt (long int n) |
Real | Math::Rand () |
Generates a random Real uniformly in [0,1]. | |
Real | Math::Rand (Real a, Real b) |
Generates a random Real uniformly in [a,b]. | |
Real | Math::RandGaussian () |
Real | Math::RandGaussian (Real mean, Real stddev) |
Generates a random Real in a Gaussian distribution. | |
bool | Math::RandBool () |
Generates a random boolean that is true with probability 0.5. | |
bool | Math::RandBool (Real p) |
Generates a random boolean that is true with probability p. | |
Defines a standard method for random floating-point number generation.
The random number generator is defined as Math::rng.