|
PSCF v1.3.3
|
Mersenne Twister random number generator engine. More...
#include <mtrand.h>
Public Member Functions | |
| MTRand_int32 () | |
| Default constructor. | |
| MTRand_int32 (unsigned long s) | |
| Constructor with 32 bit int as seed. | |
| MTRand_int32 (const unsigned long *array, int size) | |
| Constructor with array of size 32 bit ints as seed. | |
| MTRand_int32 (const MTRand_int32 &) | |
| Copy constructor. | |
| void | operator= (const MTRand_int32 &) |
| Assignment. | |
| virtual | ~MTRand_int32 () |
| Destructor. | |
| void | seed (unsigned long) |
| Seed with 32 bit integer. | |
| void | seed (const unsigned long *, int size) |
| Seed with array. | |
| unsigned long | operator() () |
| Overload operator() to make this a generator (functor) | |
| template<class Archive> | |
| void | serialize (Archive &ar, const unsigned int version) |
| Serialize to/from an archive. | |
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 | ( | ) |
Default constructor.
Definition at line 13 of file mtrand.cpp.
References seed().
Referenced by MTRand_int32(), and operator=().
| 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 | ) |
|
inlinevirtual |
| void Util::MTRand_int32::operator= | ( | const MTRand_int32 & | other | ) |
| 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(), MTRand_int32(), 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 ) |