Uniform random number generator.
More...
#include <mt19937uniformrng.hpp>
|
static const Size | N = 624 |
|
static const Size | M = 397 |
|
static const unsigned long | MATRIX_A = 0x9908b0dfUL |
|
static const unsigned long | UPPER_MASK =0x80000000UL |
|
static const unsigned long | LOWER_MASK =0x7fffffffUL |
|
Uniform random number generator.
Mersenne Twister random number generator of period 2**19937-1
For more details see http://www.math.keio.ac.jp/matumoto/emt.html
- Tests:
- the correctness of the returned values is tested by checking them against known good results.
- Examples
- GlobalOptimizer.cpp.
Definition at line 41 of file mt19937uniformrng.hpp.
◆ sample_type
◆ MersenneTwisterUniformRng() [1/2]
if the given seed is 0, a random seed will be chosen based on clock()
Definition at line 82 of file mt19937uniformrng.cpp.
◆ MersenneTwisterUniformRng() [2/2]
◆ next()
returns a sample with weight 1.0 containing a random number in the (0.0, 1.0) interval
Definition at line 54 of file mt19937uniformrng.hpp.
◆ nextReal()
◆ nextInt32()
unsigned long nextInt32 |
( |
| ) |
const |
◆ seedInitialization()
void seedInitialization |
( |
unsigned long |
seed | ) |
|
|
private |
◆ twist()
◆ mt
◆ mti
◆ MATRIX_A
const unsigned long MATRIX_A = 0x9908b0dfUL |
|
staticprivate |
◆ UPPER_MASK
const unsigned long UPPER_MASK =0x80000000UL |
|
staticprivate |
◆ LOWER_MASK
const unsigned long LOWER_MASK =0x7fffffffUL |
|
staticprivate |