![]() |
Murl Engine API
Version 2018.3
|
The Well random number generator. More...
#include <murl_util_rng.h>
The Well random number generator.
The Well1024 generator has high quality with a period of 2^1024.
Public Member Functions | |
Well1024 () | |
The default constructor. More... | |
Well1024 (UInt32 seed) | |
Constructor taking a seed value. More... | |
virtual | ~Well1024 () |
The destructor. | |
virtual void | Seed (UInt32 seed) |
Seed the random number generator. More... | |
virtual UInt32 | Rand () |
Get a random number in the full UInt32 range. More... | |
![]() | |
virtual | ~Rng () |
The destructor. | |
Bool | RandBool () |
Get a random Bool value. More... | |
UInt32 | RandUInt (UInt32 from, UInt32 to) |
Get a random UInt32 value within a specified range. More... | |
SInt32 | RandSInt (SInt32 from, SInt32 to) |
Get a random SInt32 value within a specified range. More... | |
Real | RandReal (Real from, Real to) |
Get a random Real value within a specified range. More... | |
Double | RandDouble (Double from, Double to) |
Get a random Double value within a specified range. More... | |
SInt32 | Draw (const UInt32Array &distribution) |
Draw an index from a distribution array. More... | |
SInt32 | DrawNoReplacement (UInt32Array &distribution) |
Draw an index from a distribution array with no replacement. More... | |
SInt32 | DrawNoReplacement (UInt32Array &distribution, UInt32 decrement) |
Draw an index from a distribution array with no replacement. More... | |
Additional Inherited Members | |
![]() | |
Rng () | |
The default constructor. | |
Murl::Util::Well1024::Well1024 | ( | ) |
The default constructor.
Seed() the random number generator with the current time nanoseconds fraction.
Murl::Util::Well1024::Well1024 | ( | UInt32 | seed | ) |
Constructor taking a seed value.
seed | The seed value. |
|
virtual |
Seed the random number generator.
The seed is used for a temporary Marsaglia generator which is used for initializing the internal 1024 bit state.
seed | The seed value. |
Implements Murl::Util::Rng.
|
virtual |