The Pcg32 class
PCG-XSH-RR with 64 bits of state and 32-bit output (Melissa O'Neill, https://www.pcg-random.org), seeded exactly as the reference pcg32_srandom_r(seed, stream).
More...
#include <pcg.hpp>
|
| constexpr | Pcg32 (std::uint64_t value=default_seed, std::uint64_t stream=default_stream) noexcept |
| |
template<class SeedSeq >
requires (!std::convertible_to<SeedSeq &, std::uint64_t>) |
| | Pcg32 (SeedSeq &sequence) |
| |
| constexpr void | seed (std::uint64_t value, std::uint64_t stream=default_stream) noexcept |
| |
template<class SeedSeq >
requires (!std::convertible_to<SeedSeq &, std::uint64_t>) |
| void | seed (SeedSeq &sequence) |
| |
| constexpr result_type | operator() () noexcept |
| |
| constexpr void | discard (unsigned long long n) noexcept |
| |
|
| static constexpr std::uint64_t | default_seed = 0x853C49E6748FEA9BULL |
| |
| static constexpr std::uint64_t | default_stream = 0xDA3E39CB94B95BDBULL |
| |
The Pcg32 class
PCG-XSH-RR with 64 bits of state and 32-bit output (Melissa O'Neill, https://www.pcg-random.org), seeded exactly as the reference pcg32_srandom_r(seed, stream).
◆ result_type
◆ Pcg32() [1/2]
|
|
inlineexplicitconstexprnoexcept |
◆ Pcg32() [2/2]
template<class SeedSeq >
requires (!std::convertible_to<SeedSeq &, std::uint64_t>)
| randlib::Pcg32::Pcg32 |
( |
SeedSeq & |
sequence | ) |
|
|
inlineexplicit |
◆ discard()
| constexpr void randlib::Pcg32::discard |
( |
unsigned long long |
n | ) |
|
|
inlineconstexprnoexcept |
◆ max()
|
|
inlinestaticconstexprnoexcept |
◆ min()
|
|
inlinestaticconstexprnoexcept |
◆ operator()()
◆ seed() [1/2]
template<class SeedSeq >
requires (!std::convertible_to<SeedSeq &, std::uint64_t>)
| void randlib::Pcg32::seed |
( |
SeedSeq & |
sequence | ) |
|
|
inline |
◆ seed() [2/2]
| constexpr void randlib::Pcg32::seed |
( |
std::uint64_t |
value, |
|
|
std::uint64_t |
stream = default_stream |
|
) |
| |
|
inlineconstexprnoexcept |
◆ operator==
| constexpr bool operator== |
( |
const Pcg32 & |
, |
|
|
const Pcg32 & |
|
|
) |
| |
|
friend |
◆ default_seed
| constexpr std::uint64_t randlib::Pcg32::default_seed = 0x853C49E6748FEA9BULL |
|
staticconstexpr |
◆ default_stream
| constexpr std::uint64_t randlib::Pcg32::default_stream = 0xDA3E39CB94B95BDBULL |
|
staticconstexpr |
The documentation for this class was generated from the following file: