|
Aikido
|
Concrete implementation of the RNG type erasure class. More...
#include <aikido/common/RNG.hpp>
Public Types | |
| using | engine_type = std::independent_bits_engine< T, RNG::NUM_BITS, result_type > |
| using | result_type = std::uint32_t |
Public Types inherited from aikido::common::RNG | |
| using | result_type = std::uint32_t |
Public Member Functions | |
| RNGWrapper ()=default | |
| Constructs a random engine with a default seed. More... | |
| RNGWrapper (const T &_rng) | |
| Constructs a random engine with the state from an existing random engine. More... | |
| RNGWrapper (result_type _seed) | |
| Constructs a random engine with the specified seed. More... | |
| virtual | ~RNGWrapper ()=default |
| T & | rng () |
| Gets the internal random engine. More... | |
| const T & | rng () const |
| Gets the internal random engine. More... | |
| result_type | operator() () override |
| Advances the state of the engine and returns the generated value. More... | |
| void | discard (unsigned long long _z) override |
| Advances the adaptor's state by a specified amount. More... | |
| std::unique_ptr< RNG > | clone () const override |
| Create a copy of this RNG, including its internal state. More... | |
| std::unique_ptr< RNG > | clone (result_type _seed) const override |
| Create a new RNG of this type with the specified seed. More... | |
Public Member Functions inherited from aikido::common::RNG | |
| virtual | ~RNG ()=default |
Private Attributes | |
| engine_type | mRng |
Additional Inherited Members | |
Static Public Member Functions inherited from aikido::common::RNG | |
| static constexpr result_type | min () |
| Gets the smallest possible value in the output range, always zero. More... | |
| static constexpr result_type | max () |
| Gets the largest possible value in the output range, 2^NUM_BITS - 1. More... | |
Static Public Attributes inherited from aikido::common::RNG | |
| static constexpr std::size_t | NUM_BITS {32} |
| Number of bits the generated numbers should have. More... | |
Concrete implementation of the RNG type erasure class.
| type | of random engine to wrap |
| using aikido::common::RNGWrapper< T >::engine_type = std::independent_bits_engine<T, RNG::NUM_BITS, result_type> |
| using aikido::common::RNG::result_type = std::uint32_t |
|
default |
Constructs a random engine with a default seed.
|
explicit |
Constructs a random engine with the state from an existing random engine.
| _rng | instance to use for initialization |
|
explicit |
Constructs a random engine with the specified seed.
| _seed | initial seed to use for the random engine |
|
virtualdefault |
|
overridevirtual |
Create a copy of this RNG, including its internal state.
Implements aikido::common::RNG.
|
overridevirtual |
Create a new RNG of this type with the specified seed.
| _seed | new sed |
Implements aikido::common::RNG.
|
overridevirtual |
Advances the adaptor's state by a specified amount.
| _z | amount of state to discard |
Implements aikido::common::RNG.
|
overridevirtual |
Advances the state of the engine and returns the generated value.
Implements aikido::common::RNG.
| auto aikido::common::RNGWrapper< T >::rng |
Gets the internal random engine.
| const T& aikido::common::RNGWrapper< T >::rng | ( | ) | const |
Gets the internal random engine.
|
private |