|
Scythe-1.0.3
|
The Mersenne Twister random number generator. More...
#include <scythestat/rng/mersenne.h>


Public Member Functions | |
| mersenne (const mersenne &m) | |
| Copy constructor. | |
| void | initialize (unsigned long s) |
| Sets the seed. | |
| double | runif () |
| Generate a random uniform variate on (0, 1). | |
| template<matrix_order O, matrix_style S> | |
| Matrix< double, O, S > | runif (unsigned int rows, unsigned int cols) |
| Generate a Matrix of random uniform variates. | |
| Matrix< double, Col, Concrete > | runif (unsigned int rows, unsigned int cols) |
| Generate a Matrix of random uniform variates. | |
| unsigned long | genrand_int32 () |
| Generate a random long integer. | |
Static Public Member Functions | |
| mersenne () | |
| Default constructor. | |
Protected Attributes | |
| unsigned long | mt [N] |
| int | mti |
Static Protected Attributes | |
| static const int | N = 624 |
| static const int | M = 398 |
The Mersenne Twister random number generator.
This class defines a random number generator, using the Mersenne Twister algorithm developed and implemented by Makoto Matsumoto and Takuji Nishimura (1997, 2002). The period of this random number generator is
.
The mersenne class extends Scythe's basic random number generating class, scythe::rng, implementing the interface that it defines.
1.7.6.1