#include <MersenneTwisterRandomEngine.h>
◆ peek()
virtual int MersenneTwisterRandomEngine::peek |
( |
int |
hi | ) |
const |
|
inlineoverridevirtual |
Note that this method is mainly for debugging, implementation is not required to be efficient.
- Parameters
-
hi | Upper bound for the result. Must be greater than zero. |
- Returns
- Random number that the next call to
random(hi)
will return.
Implements RandomEngine.
◆ random()
virtual int MersenneTwisterRandomEngine::random |
( |
int |
hi | ) |
|
|
inlineoverridevirtual |
- Parameters
-
hi | Upper bound for the result. Must be greater than zero. |
- Returns
- Random number in range
[0, hi)
.
Implements RandomEngine.
◆ randomFloat()
virtual float MersenneTwisterRandomEngine::randomFloat |
( |
| ) |
|
|
inlineoverridevirtual |
- Returns
- Random floating point number in range
[0, 1)
.
Implements RandomEngine.
◆ seed()
virtual void MersenneTwisterRandomEngine::seed |
( |
int |
seed | ) |
|
|
inlineoverridevirtual |
Reinitializes this random engine with the provided seed value. Passing 0
should be equivalent to calling an in-place destructor and then reconstructing the object.
- Parameters
-
Implements RandomEngine.
◆ _base
std::mt19937 MersenneTwisterRandomEngine::_base |
|
private |
The documentation for this class was generated from the following file: