Mersenne Twister pseudo random number generator.
More...
#include <MersenneTwister.hpp>
Mersenne Twister pseudo random number generator.
MTToolBox::MersenneTwister::MersenneTwister |
( |
| ) |
|
|
inline |
Constructor without arguments.
References seed().
MTToolBox::MersenneTwister::MersenneTwister |
( |
uint32_t |
value | ) |
|
|
inline |
Constructor with a integer seed.
- Parameters
-
[in] | value | Seed of initialization |
References seed().
MTToolBox::MersenneTwister::MersenneTwister |
( |
const std::string & |
value | ) |
|
|
inline |
Constructor with a string seed.
- Parameters
-
[in] | value | Seed of initialization |
References seed().
MTToolBox::MersenneTwister::MersenneTwister |
( |
const uint32_t * |
value, |
|
|
int |
size |
|
) |
| |
|
inline |
Constructor with an array of integer.
- Parameters
-
[in] | value | Seed of initialization |
[in] | size | length of value |
References seed().
MTToolBox::MersenneTwister::~MersenneTwister |
( |
| ) |
|
|
inline |
int MTToolBox::MersenneTwister::bitSize |
( |
| ) |
const |
|
inlinevirtual |
uint32_t MTToolBox::MersenneTwister::generate |
( |
| ) |
|
|
inlinevirtual |
uint32_t MTToolBox::MersenneTwister::next |
( |
| ) |
|
|
inline |
Generates pseudo random number.
- Returns
- a 32-bit unsigned integer
Referenced by generate().
void MTToolBox::MersenneTwister::seed |
( |
uint32_t |
value | ) |
|
|
inlinevirtual |
void MTToolBox::MersenneTwister::seed |
( |
const std::string & |
value | ) |
|
|
inline |
Initialization by a string.
- Parameters
-
[in] | value | Seed of initialization |
void MTToolBox::MersenneTwister::seed |
( |
const uint32_t * |
value, |
|
|
int |
key_length |
|
) |
| |
|
inline |
Initialization by an array of unsigned integers.
- Parameters
-
[in] | value | Seed of initialization |
[in] | key_length | Length of value |
template<class T >
void MTToolBox::MersenneTwister::seed_array |
( |
const T * |
value, |
|
|
int |
key_length |
|
) |
| |
|
inline |
Initialization by an array of T type.
- Template Parameters
-
T | type of element of value |
- Parameters
-
[in] | value | Seed of initialization |
| key_length | Length of value |
References seed().
The documentation for this class was generated from the following file: