DUNE: Uniform Navigational Environment
2016.05.0
|
Mersenne-Twister 19937 RNG - used in Matlab 7.4 onwards.
The 19937 number relates to its period (2^19937 - 1). See http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
The implementation is a slight adjustment of code by Takuji Nishimura and Makoto Matsumoto.
Public Member Functions | |
MT19937 (void) | |
MT19937 (int32_t seed) | |
~MT19937 (void) | |
int32_t | random (void) |
double | uniform (void) |
void | seed (int32_t) |
Public Member Functions inherited from DUNE::Math::Random::Generator | |
virtual | ~Generator () |
double | uniform (double a, double b) |
double | gaussian (void) |
double | gaussian (double mu, double sigma) |
void | ballU (double radius, double *x, double *y) |
void | ballG (double sigma, double *x, double *y) |
Additional Inherited Members | |
Static Public Member Functions inherited from DUNE::Math::Random::Generator | |
static int32_t | arbitrarySeed (void) |
Static Public Attributes inherited from DUNE::Math::Random::Generator | |
static const int32_t | c_max_random |
DUNE::Math::Random::MT19937::MT19937 | ( | void | ) |
References DUNE::Math::Random::Generator::arbitrarySeed(), and seed().
DUNE::Math::Random::MT19937::MT19937 | ( | int32_t | seed | ) |
References seed().
DUNE::Math::Random::MT19937::~MT19937 | ( | void | ) |
|
virtual |
Generate a 32-bit signed integer, uniformly distributed in [0,c_max_random].
Implements DUNE::Math::Random::Generator.
|
virtual |
Re-initialize generator with given seed.
value | value for seed. |
Implements DUNE::Math::Random::Generator.
References DUNE::Math::Random::Generator::c_max_random.
Referenced by MT19937().
|
virtual |
Generate double-precision floating point number with uniform distribution in [0,1].
Default implementation returns value of random()/c_max_random.
Reimplemented from DUNE::Math::Random::Generator.