|
Simpatico
v1.10
|
Mersenne Twister random number generator engine.
Generates unsigned long integers randomly distributed over the range 0 < i < 2^{32} - 1.
#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... | |
| 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 |
Destructor.
2007-02-11: made the destructor virtual; Thanks "double more" for pointing this out
Definition at line 105 of file mtrand.h.
References operator()(), seed(), and serialize().
| 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(), seed(), and ~MTRand_int32().
| void Util::MTRand_int32::seed | ( | const unsigned long * | array, |
| int | size | ||
| ) |
|
inline |
Overload operator() to make this a generator (functor)
Generate 32 bit random int, public method.
Definition at line 197 of file mtrand.h.
Referenced by ~MTRand_int32().
| void Util::MTRand_int32::serialize | ( | Archive & | ar, |
| const unsigned int | version | ||
| ) |
Serialize to/from an archive.
Definition at line 185 of file mtrand.h.
Referenced by ~MTRand_int32().
1.8.11