Health-GPS
1.2.2.0
Global Health Policy Simulation model (Health-GPS)
|
Mersenne Twister random number generator algorithm. More...
#include <mtrandom.h>
Public Member Functions | |
MTRandom32 () | |
Initialise a new instance of the MTRandom32 class. More... | |
MTRandom32 (const unsigned int seed) | |
Initialise a new instance of the MTRandom32 class. More... | |
unsigned int | operator() () override |
Generates the next random number. More... | |
void | seed (const unsigned int) override |
Sets the current state of the generator engine. More... | |
void | discard (const unsigned long long skip) override |
Advances the engine's state by a specified amount. More... | |
double | next_double () noexcept override |
Generates a random floating point number in range [0,1) More... | |
![]() | |
virtual | ~RandomBitGenerator ()=default |
Destroys a RandomBitGenerator instance. More... | |
Static Public Member Functions | |
static constexpr unsigned int | min () |
Gets the smallest possible value in the output range. More... | |
static constexpr unsigned int | max () |
Gets the largest possible value in the output range. More... | |
![]() | |
static constexpr result_type | min () |
Gets the smallest possible value in the output range. More... | |
static constexpr result_type | max () |
Gets the largest possible value in the output range. More... | |
Additional Inherited Members | |
![]() | |
using | result_type = unsigned int |
Mersenne Twister random number generator algorithm.
hgps::MTRandom32::MTRandom32 | ( | ) |
Initialise a new instance of the MTRandom32 class.
|
explicit |
Initialise a new instance of the MTRandom32 class.
seed | The value to initialise the internal state |
|
overridevirtual |
Advances the engine's state by a specified amount.
skip | The number of times to advance the state |
Implements hgps::RandomBitGenerator.
|
inlinestaticconstexpr |
Gets the largest possible value in the output range.
|
inlinestaticconstexpr |
Gets the smallest possible value in the output range.
|
overridevirtualnoexcept |
Generates a random floating point number in range [0,1)
Implements hgps::RandomBitGenerator.
|
overridevirtual |
Generates the next random number.
Implements hgps::RandomBitGenerator.
|
overridevirtual |
Sets the current state of the generator engine.
seed | The value to initialise the internal state |
Implements hgps::RandomBitGenerator.