A pseudo-random number generator implementation using the merseinne twister MT 19937 cf. Makoto Matsumoto, Takuji Nishimura: Mersenne twister. "A 623-dimensionally equidistributed uniform pseudorandom number generator." ACM Transactions on Modeling and Computer Simulation 8, 1998. More...
#include <random.hpp>
Public Member Functions | |
merseinne_twister_generator () | |
Default CTOR to ensure default constructability. More... | |
merseinne_twister_generator (unsigned int seed) | |
CTOR, which accepts the seed to the generator. More... | |
void | seed (unsigned int s) |
Sets the seed of the pseudo-random number generator. More... | |
ValueT | operator() () |
Returns a pseudo-random number using MT19937. Not const, since the internal state is being changed! More... | |
A pseudo-random number generator implementation using the merseinne twister MT 19937 cf. Makoto Matsumoto, Takuji Nishimura: Mersenne twister. "A 623-dimensionally equidistributed uniform pseudorandom number generator." ACM Transactions on Modeling and Computer Simulation 8, 1998.
Definition at line 76 of file random.hpp.
|
inline |
Default CTOR to ensure default constructability.
Definition at line 82 of file random.hpp.
|
inline |
CTOR, which accepts the seed to the generator.
Definition at line 85 of file random.hpp.
|
inline |
Returns a pseudo-random number using MT19937. Not const, since the internal state is being changed!
Definition at line 96 of file random.hpp.
|
inline |
Sets the seed of the pseudo-random number generator.
s | The seed to get reproduceable sequences of numbers |
Definition at line 91 of file random.hpp.