OSFEG-C++
1.4.6
OpenSF Error Generation Library
|
Random numbers engine with additional distributions. More...
#include <Random.h>
Public Member Functions | |
Random (int32_t seed) | |
constructor to set the seed | |
Random () | |
constructor to autogenerate a seed | |
Random (int32_t seed, bool f) | |
constructor to set the seed and the modified state | |
Random (const Random &r)=default | |
copy constructor (copies current state) | |
Random & | operator= (const Random &r)=default |
overloaded assignment (replaces state) | |
int32_t | getSeed () |
Return the current seed value. | |
Utility functions | |
void | reset (int32_t seed) |
reset the seed explicitly | |
void | reset () |
reset seed from current process id | |
Continuous Distributions | |
double | beta (double v, double w, double xMin=0., double xMax=1.) |
Beta (v > 0. and w > 0.) | |
double | gamma (double a, double b, double c) |
double | exponential (double a=0., double c=1.) |
double | normal (double mu=0., double sigma=1.) |
Normal (Gaussian) | |
double | uniform (double xMin=0., double xMax=1.) |
Uniform on [xMin,xMax) | |
Discrete Distributions | |
int | poisson (double mu) |
Poisson. | |
int | uniformDiscrete (int i, int j) |
Friends | |
bool | operator== (const Random &a, const Random &b) |
| |
bool | operator!= (const Random &a, const Random &b) |
| |
Random numbers engine with additional distributions.
double Random::exponential | ( | double | a = 0. , |
double | c = 1. |
||
) |
Exponential location a, shape c
double Random::gamma | ( | double | a, |
double | b, | ||
double | c | ||
) |
Gamma location a, scale b, shape c
int Random::uniformDiscrete | ( | int | i, |
int | j | ||
) |
Uniform Discrete inclusive i to j