FastRandom
Functions
|
|
void |
|
unsigned int |
Detailed Description
-
class FastRandom : public RED::RNG
Class providing a xorshift-based pseudo-random numbers generator.
@related class RED::Random
This implementation is cross-platform and ensures users that the same numbers will be returned for a given seed on every machine run under any OS.
This generator is intended to be very fast for random numbers generation when very good statistics performances are not the key.
Public Functions
- SET_CID (CID_class_REDFastRandom) IMPLEMENT_AS()
-
FastRandom(unsigned int iSeed = 24091975)
Constructs a random numbers generator.
- Parameters
iSeed – seed used for initialization.
-
virtual void Init(unsigned int iSeed)
Initializes a 32bit pseudo-random numbers generator.
- Parameters
iSeed – seed used for initialization.
-
virtual unsigned int Rand32()
- Returns
a 32bit pseudo-random number in the range [0, RED::Random::Max32-1].