Implementation of the xoroshiro128++ pseudorandom number generator that provides the API required for a standard uniform random bit generator, so that it can be plugged into any of the random number distributions provided by the standard library.
More...
#include <donut/random.hpp>
Implementation of the xoroshiro128++ pseudorandom number generator that provides the API required for a standard uniform random bit generator, so that it can be plugged into any of the random number distributions provided by the standard library.
This engine is small, fast and fairly high quality compared to most of the pseudorandom number generators in the standard library.
- Warning
- This engine does not produce cryptographcially secure randomness and should not be used for such purposes.
- See also
- https://prng.di.unimi.it/ for more information.
◆ result_type
◆ Xoroshiro128PlusPlusEngine() [1/2]
constexpr donut::random::Xoroshiro128PlusPlusEngine::Xoroshiro128PlusPlusEngine |
( |
| ) |
|
|
inlineconstexprnoexcept |
◆ Xoroshiro128PlusPlusEngine() [2/2]
constexpr donut::random::Xoroshiro128PlusPlusEngine::Xoroshiro128PlusPlusEngine |
( |
result_type |
value | ) |
|
|
inlineexplicitconstexprnoexcept |
◆ min()
static constexpr result_type donut::random::Xoroshiro128PlusPlusEngine::min |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ max()
static constexpr result_type donut::random::Xoroshiro128PlusPlusEngine::max |
( |
| ) |
|
|
inlinestaticconstexpr |
◆ seed()
◆ operator()()
constexpr result_type donut::random::Xoroshiro128PlusPlusEngine::operator() |
( |
| ) |
|
|
inlineconstexprnoexcept |
◆ discard()
constexpr void donut::random::Xoroshiro128PlusPlusEngine::discard |
( |
unsigned long long |
z | ) |
|
|
inlineconstexprnoexcept |
◆ jump()
constexpr void donut::random::Xoroshiro128PlusPlusEngine::jump |
( |
| ) |
|
|
inlineconstexprnoexcept |
Advance the internal state 2^64 times.
◆ longJump()
constexpr void donut::random::Xoroshiro128PlusPlusEngine::longJump |
( |
| ) |
|
|
inlineconstexprnoexcept |
Advance the internal state 2^96 times.
◆ operator==()
◆ operator<<
template<typename CharT , typename Traits >
std::basic_ostream<CharT, Traits>& operator<< |
( |
std::basic_ostream< CharT, Traits > & |
stream, |
|
|
const Xoroshiro128PlusPlusEngine & |
engine |
|
) |
| |
|
friend |
◆ operator>>
template<typename CharT , typename Traits >
std::basic_istream<CharT, Traits>& operator>> |
( |
std::basic_istream< CharT, Traits > & |
stream, |
|
|
Xoroshiro128PlusPlusEngine & |
engine |
|
) |
| |
|
friend |
◆ default_seed
constexpr result_type donut::random::Xoroshiro128PlusPlusEngine::default_seed = SplitMix64Engine::default_seed |
|
staticconstexpr |
The documentation for this class was generated from the following file: