#include <generators.h>
Inheritance diagram for generators::RNG:

Public Member Functions | |
| virtual unsigned int | nextInt ()=0 |
| Returns the next pseudo-random number from this RNG. | |
| virtual double | nextDouble () |
| Returns the next normalised pseudo-random number from this RNG. | |
| virtual void | setSeed (unsigned int seed) |
| Sets the current seed to a given number. | |
| virtual unsigned int | getMaximum () |
| Returns the maximum number that this RNG can produce, used for normalisation of the integer numbers. | |
| virtual | ~RNG () |
| Base deconstructor. | |
Protected Attributes | |
| unsigned int | _seed |
| The current seed of this RNG. | |
Derived classes should define the now virtual methods with specific steps to generate random numbers and normalise them.
|
|
Returns the maximum number that this RNG can produce, used for normalisation of the integer numbers.
Reimplemented in generators::STD_RANDOM, and generators::LC_RNG. |
|
|
Returns the next normalised pseudo-random number from this RNG. Normalisation is done automatically, as well as updating the current seed.
|
|
|
Returns the next pseudo-random number from this RNG. Seed updating is done automatically.
Implemented in generators::STD_RANDOM, and generators::LC_RNG. |
|
|
Sets the current seed to a given number.
Reimplemented in generators::STD_RANDOM. |
1.3.9.1