STE-Industries: utilities testing
|
#include "RandomGenerator.h"
Public Member Functions | |
RandomGenerator (const RandomGenerator &Argument) noexcept=default | |
RandomGenerator (RandomGenerator &&Argument) noexcept=default | |
RandomGenerator (void) noexcept | |
~RandomGenerator (void) noexcept=default | |
uint_fast32_t | Generate (uint_fast32_t Maximum) noexcept |
void | GetSeed (uint_fast32_t Seed[NUMBER_OF_GENERATORS+1]) const noexcept |
void | ModifySeed (uint_fast32_t Value) noexcept |
RandomGenerator & | operator= (const RandomGenerator &Argument) noexcept=default |
RandomGenerator & | operator= (RandomGenerator &&Argument) noexcept=default |
unsigned int | Select (register const uint_fast32_t *Probability, unsigned int Elements) noexcept |
void | SetSeed (const uint_fast32_t Seed[NUMBER_OF_GENERATORS+1]) noexcept |
Static Public Attributes | |
static constexpr unsigned int | MINIMUM_MODULE |
static constexpr unsigned int | NUMBER_OF_GENERATORS |
Private Attributes | |
SimpleRandomGenerator | Generator [NUMBER_OF_GENERATORS] |
SimpleRandomGenerator | Selector |
The RandomGenerator class represents a random numbers generator, based upon an array of linear congruent random numbers generator.
Proper choice of the parameter ensures that the cycle of generated numbers does not repeats itself with Universe existence.
Definition at line 31 of file RandomGenerator.h.
|
inlinenoexcept |
None. |
Definition at line 29 of file RandomGenerator.inl.
|
defaultnoexcept |
|
defaultnoexcept |
|
defaultnoexcept |
|
inlinenoexcept |
Maximum | The maximum number that can be generated; if it is zero, zero is generated; |
None. |
Definition at line 160 of file RandomGenerator.inl.
Referenced by GraphicSpace::Bitmap::Randomize().
|
inlinenoexcept |
Seed | Array that will contain the seeds. |
None. |
Definition at line 104 of file RandomGenerator.inl.
References Generator, GraphicSpace::SimpleRandomGenerator::GetValue(), NUMBER_OF_GENERATORS, and Selector.
|
inlinenoexcept |
Value | The value to be xor-ed with the seeds. |
None. |
Definition at line 128 of file RandomGenerator.inl.
Referenced by GraphicSpace::Bitmap::CorrectStrip().
|
defaultnoexcept |
|
defaultnoexcept |
|
inlinenoexcept |
Probability | Pointer to the array of probabilities, which specify the probability distribution. |
Elements | Number of emenents among which the choice is made. |
None. |
Definition at line 195 of file RandomGenerator.inl.
|
inlinenoexcept |
Seed | Initial value. |
None. |
Definition at line 80 of file RandomGenerator.inl.
References Generator, NUMBER_OF_GENERATORS, Selector, and GraphicSpace::SimpleRandomGenerator::SetSeed().
Referenced by GraphicSpace::Bitmap::Randomize().
|
private |
Random number generator, used to select one of the generators in the Generator array.
Definition at line 55 of file RandomGenerator.h.
|
staticconstexpr |
Minimum module of the generators.
Definition at line 42 of file RandomGenerator.h.
|
staticconstexpr |
Number of linear congruent generators used.
Definition at line 37 of file RandomGenerator.h.
Referenced by GetSeed(), Randomize(), and SetSeed().
|
private |
Random number generator, used to select one of the generators in the Generator array.
Definition at line 50 of file RandomGenerator.h.