Pseudo-random number generator algorithm interface.
More...
#include <randombit_generator.h>
|
| virtual | ~RandomBitGenerator ()=default |
| | Destroys a RandomBitGenerator instance.
|
| |
| virtual void | seed (const unsigned int seed)=0 |
| | Sets the current state of the generator engine.
|
| |
| virtual void | discard (const unsigned long long skip)=0 |
| | Advances the engine's state by a specified amount.
|
| |
| virtual unsigned int | next ()=0 |
| | Generates the next random number.
|
| |
| virtual double | next_double () noexcept=0 |
| | Generates a random floating point number in range [0,1)
|
| |
|
| static constexpr result_type | min () |
| | Gets the smallest possible value in the output range.
|
| |
| static constexpr result_type | max () |
| | Gets the largest possible value in the output range.
|
| |
Pseudo-random number generator algorithm interface.
◆ result_type
◆ ~RandomBitGenerator()
| virtual hgps::RandomBitGenerator::~RandomBitGenerator |
( |
| ) |
|
|
virtualdefault |
◆ discard()
| virtual void hgps::RandomBitGenerator::discard |
( |
const unsigned long long |
skip | ) |
|
|
pure virtual |
Advances the engine's state by a specified amount.
- Parameters
-
| skip | The number of times to advance the state |
Implemented in hgps::MTRandom32.
◆ max()
| static constexpr result_type hgps::RandomBitGenerator::max |
( |
| ) |
|
|
inlinestaticconstexpr |
Gets the largest possible value in the output range.
- Returns
- The maximum potentially generated value.
◆ min()
| static constexpr result_type hgps::RandomBitGenerator::min |
( |
| ) |
|
|
inlinestaticconstexpr |
Gets the smallest possible value in the output range.
- Returns
- The minimum potentially generated value.
◆ next()
| virtual unsigned int hgps::RandomBitGenerator::next |
( |
| ) |
|
|
pure virtual |
◆ next_double()
| virtual double hgps::RandomBitGenerator::next_double |
( |
| ) |
|
|
pure virtualnoexcept |
Generates a random floating point number in range [0,1)
- Returns
- A floating point value in range [0,1).
Implemented in hgps::MTRandom32.
◆ seed()
| virtual void hgps::RandomBitGenerator::seed |
( |
const unsigned int |
seed | ) |
|
|
pure virtual |
Sets the current state of the generator engine.
- Parameters
-
| seed | The value to initialise the internal state |
Implemented in hgps::MTRandom32.
The documentation for this class was generated from the following file: