NEST
2.6.0,not_revisioned_source_dir@0
|
Mersenne Twister MT19937. More...
#include <mt19937.h>
Public Member Functions | |
MT19937 (unsigned long) | |
Create generator with given seed. More... | |
~MT19937 () | |
RngPtr | clone (unsigned long s) |
clone a random number generator of same type initialized with given seed More... | |
Public Member Functions inherited from librandom::RandomGen | |
RandomGen () | |
virtual | ~RandomGen () |
double | drand (void) |
The following functions implement the user interface of the RandomGen class, including buffer management. More... | |
double | operator() (void) |
draw from [0, 1) More... | |
double | drandpos (void) |
draw from (0, 1) More... | |
unsigned long | ulrand (const unsigned long) |
draw from [0, n-1] More... | |
void | seed (const unsigned long) |
set random seed to a new value More... | |
size_t | get_buffsize (void) const |
returns buffer size More... | |
void | set_buffsize (const size_t) |
set buffer size More... | |
Private Member Functions | |
void | seed_ (unsigned long) |
implements seeding for RandomGen More... | |
double | drand_ () |
implements drawing a single [0,1) number for RandomGen More... | |
void | init_genrand (unsigned long) |
unsigned long | genrand_int32 () |
double | genrand_real2 () |
Private Attributes | |
std::vector< unsigned long > | mt |
int | mti |
Static Private Attributes | |
static const unsigned int | N = 624 |
static const unsigned int | M = 397 |
static const unsigned long | MATRIX_A = 0x9908b0dfUL |
static const unsigned long | UPPER_MASK = 0x80000000UL |
static const unsigned long | LOWER_MASK = 0x7fffffffUL |
static const double | I2DFactor_ = 1.0/4294967296.0 |
int to double factor More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from librandom::RandomGen | |
static RngPtr | create_knuthlfg_rng (unsigned long) |
Create built-in Knuth Lagged Fibonacci random generator. More... | |
Static Public Attributes inherited from librandom::RandomGen | |
static const unsigned long | DefaultSeed = 0xd37ca59fUL |
Default value for seeding generators in places where no seed is supplied. More... | |
Mersenne Twister MT19937.
This class implements the 32-bit MT19937 Mersenne Twister RNG by Matsumoto and Nishimura. The implementation wraps a C++ class around the originial code.
|
explicit |
|
inline |
|
inlinevirtual |
clone a random number generator of same type initialized with given seed
Implements librandom::RandomGen.
References MT19937().
|
inlineprivatevirtual |
implements drawing a single [0,1) number for RandomGen
Implements librandom::RandomGen.
References genrand_real2().
|
private |
References nest::names::N, and nest::names::y.
|
inlineprivate |
Referenced by drand_().
|
private |
References nest::names::N.
Referenced by MT19937().
|
privatevirtual |
implements seeding for RandomGen
Implements librandom::RandomGen.
|
staticprivate |
int to double factor
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
staticprivate |
|
staticprivate |