#include <MersenneTwister.h>
Public Types | |
enum | { N = 624 } |
enum | { SAVE = N + 1 } |
typedef unsigned long | uint32 |
Public Member Functions | |
MTRand (const uint32 &oneSeed) | |
MTRand (uint32 *const bigSeed, uint32 const seedLength=N) | |
MTRand () | |
double | rand () |
double | rand (const double &n) |
double | randExc () |
double | randExc (const double &n) |
double | randDblExc () |
double | randDblExc (const double &n) |
uint32 | randInt () |
uint32 | randInt (const uint32 &n) |
double | operator() () |
double | rand53 () |
double | randNorm (const double &mean=0.0, const double &variance=0.0) |
void | seed (const uint32 oneSeed) |
void | seed (uint32 *const bigSeed, const uint32 seedLength=N) |
void | seed () |
void | save (uint32 *saveArray) const |
void | load (uint32 *const loadArray) |
Protected Types | |
enum | { M = 397 } |
Protected Member Functions | |
void | initialize (const uint32 oneSeed) |
void | reload () |
uint32 | hiBit (const uint32 &u) const |
uint32 | loBit (const uint32 &u) const |
uint32 | loBits (const uint32 &u) const |
uint32 | mixBits (const uint32 &u, const uint32 &v) const |
uint32 | twist (const uint32 &m, const uint32 &s0, const uint32 &s1) const |
Static Protected Member Functions | |
static uint32 | hash (time_t t, clock_t c) |
Protected Attributes | |
uint32 | state [N] |
uint32 * | pNext |
int | left |
Friends | |
std::ostream & | operator<< (std::ostream &os, const MTRand &mtrand) |
std::istream & | operator>> (std::istream &is, MTRand &mtrand) |
Definition at line 69 of file MersenneTwister.h.
typedef unsigned long MTRand::uint32 |
Definition at line 72 of file MersenneTwister.h.
anonymous enum |
Enumerator | |
---|---|
N |
Definition at line 74 of file MersenneTwister.h.
anonymous enum |
Enumerator | |
---|---|
SAVE |
Definition at line 75 of file MersenneTwister.h.
|
protected |
Enumerator | |
---|---|
M |
Definition at line 78 of file MersenneTwister.h.
|
inline |
Definition at line 137 of file MersenneTwister.h.
Definition at line 140 of file MersenneTwister.h.
|
inline |
Definition at line 143 of file MersenneTwister.h.
|
inlinestaticprotected |
Definition at line 317 of file MersenneTwister.h.
Definition at line 126 of file MersenneTwister.h.
|
inlineprotected |
Definition at line 283 of file MersenneTwister.h.
|
inline |
Definition at line 353 of file MersenneTwister.h.
Definition at line 127 of file MersenneTwister.h.
Definition at line 128 of file MersenneTwister.h.
Definition at line 129 of file MersenneTwister.h.
|
inline |
Definition at line 104 of file MersenneTwister.h.
|
inline |
Definition at line 146 of file MersenneTwister.h.
|
inline |
Definition at line 149 of file MersenneTwister.h.
|
inline |
Definition at line 164 of file MersenneTwister.h.
|
inline |
Definition at line 158 of file MersenneTwister.h.
|
inline |
Definition at line 161 of file MersenneTwister.h.
|
inline |
Definition at line 152 of file MersenneTwister.h.
|
inline |
Definition at line 155 of file MersenneTwister.h.
|
inline |
Definition at line 179 of file MersenneTwister.h.
|
inline |
Definition at line 195 of file MersenneTwister.h.
|
inline |
Definition at line 170 of file MersenneTwister.h.
|
inlineprotected |
Definition at line 301 of file MersenneTwister.h.
|
inline |
Definition at line 343 of file MersenneTwister.h.
|
inline |
Definition at line 215 of file MersenneTwister.h.
Definition at line 223 of file MersenneTwister.h.
|
inline |
Definition at line 259 of file MersenneTwister.h.
|
inlineprotected |
Definition at line 131 of file MersenneTwister.h.
|
friend |
Definition at line 364 of file MersenneTwister.h.
|
friend |
Definition at line 373 of file MersenneTwister.h.
|
protected |
Definition at line 82 of file MersenneTwister.h.
|
protected |
Definition at line 81 of file MersenneTwister.h.
Definition at line 80 of file MersenneTwister.h.