Ocular Engine
|
#include <MersenneTwister19937.hpp>
Public Member Functions | |
virtual void | seed (int64_t seed) |
virtual uint32_t | next () |
![]() | |
uint32_t | operator() () |
void | seed () |
virtual uint32_t | next (uint32_t min, uint32_t max) |
virtual float | nextf (float precision=0.0001f) |
virtual float | nextf (float min, float max, float precision=0.0001f) |
virtual int32_t | nextSigned () |
virtual int32_t | nextSigned (int32_t min, int32_t max) |
virtual uint32_t | min () |
virtual uint32_t | max () |
Protected Attributes | |
std::array< uint32_t, 624 > | m_State |
uint32_t | m_I |
![]() | |
int64_t | m_Seed |
Implementation of the 19937 periodicity variation of the Mersenne Twister PRNG using the IRandom interface.
Original implementation may be found at: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html Copyright Takuji Nishimura and Makoto Matsumoto
|
virtual |
Retrieves the next pseudo-random number (unbounded).
Implements Ocular::Math::Random::ARandom.
|
virtual |
Seeds the PRNG with the specified seed value.
[in] | seed |
Reimplemented from Ocular::Math::Random::ARandom.