PSCF v1.1
|
Mersenne Twister random number generator engine. More...
#include <mtrand.h>
Public Member Functions | |
MTRand_int32 () | |
Default constructor. More... | |
MTRand_int32 (unsigned long s) | |
Constructor with 32 bit int as seed. More... | |
MTRand_int32 (const unsigned long *array, int size) | |
Constructor with array of size 32 bit ints as seed. More... | |
MTRand_int32 (const MTRand_int32 &) | |
Copy constructor. More... | |
void | operator= (const MTRand_int32 &) |
Assignment. More... | |
virtual | ~MTRand_int32 () |
Destructor. More... | |
void | seed (unsigned long) |
Seed with 32 bit integer. More... | |
void | seed (const unsigned long *, int size) |
Seed with array. More... | |
unsigned long | operator() () |
Overload operator() to make this a generator (functor) More... | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int version) |
Serialize to/from an archive. More... | |
Mersenne Twister random number generator engine.
Generates unsigned long integers randomly distributed over the range 0 < i < 2^{32} - 1.
Util::MTRand_int32::MTRand_int32 | ( | ) |
Util::MTRand_int32::MTRand_int32 | ( | unsigned long | s | ) |
Util::MTRand_int32::MTRand_int32 | ( | const unsigned long * | array, |
int | size | ||
) |
Constructor with array of size 32 bit ints as seed.
Definition at line 37 of file mtrand.cpp.
References seed().
Util::MTRand_int32::MTRand_int32 | ( | const MTRand_int32 & | other | ) |
Copy constructor.
Definition at line 49 of file mtrand.cpp.
|
inlinevirtual |
void Util::MTRand_int32::operator= | ( | const MTRand_int32 & | other | ) |
Assignment.
Definition at line 61 of file mtrand.cpp.
void Util::MTRand_int32::seed | ( | unsigned long | s | ) |
Seed with 32 bit integer.
Definition at line 86 of file mtrand.cpp.
Referenced by MTRand_int32(), and seed().
void Util::MTRand_int32::seed | ( | const unsigned long * | array, |
int | size | ||
) |
|
inline |
void Util::MTRand_int32::serialize | ( | Archive & | ar, |
const unsigned int | version | ||
) |