RandLib 2.0.0
Probability distributions, fitting, and heavy-tail tools for C++20
Loading...
Searching...
No Matches
randlib::Pcg64 Class Reference

The Pcg64 class
PCG-XSL-RR with 128 bits of state and 64-bit output, the pcg64 engine of the reference C++ library and of NumPy, seeded as pcg64(seed, stream). More...

#include <pcg.hpp>

Public Types

using result_type = std::uint64_t
 

Public Member Functions

constexpr Pcg64 (std::uint64_t value=default_seed, std::uint64_t stream=default_stream) noexcept
 
template<class SeedSeq >
requires (!std::convertible_to<SeedSeq &, std::uint64_t>)
 Pcg64 (SeedSeq &sequence)
 
constexpr void seed (std::uint64_t value, std::uint64_t stream=default_stream) noexcept
 pcg_engines::setseq_xsl_rr_128_64(seed, stream) with 64-bit seed and stream
 
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 Public Member Functions

static constexpr result_type min () noexcept
 
static constexpr result_type max () noexcept
 

Static Public Attributes

static constexpr std::uint64_t default_seed = 0xCAFEF00DD15EA5E5ULL
 
static constexpr std::uint64_t default_stream = 0
 

Friends

constexpr bool operator== (const Pcg64 &, const Pcg64 &)=default
 

Detailed Description

The Pcg64 class
PCG-XSL-RR with 128 bits of state and 64-bit output, the pcg64 engine of the reference C++ library and of NumPy, seeded as pcg64(seed, stream).

Member Typedef Documentation

◆ result_type

using randlib::Pcg64::result_type = std::uint64_t

Constructor & Destructor Documentation

◆ Pcg64() [1/2]

constexpr randlib::Pcg64::Pcg64 ( std::uint64_t  value = default_seed,
std::uint64_t  stream = default_stream 
)
inlineexplicitconstexprnoexcept

◆ Pcg64() [2/2]

template<class SeedSeq >
requires (!std::convertible_to<SeedSeq &, std::uint64_t>)
randlib::Pcg64::Pcg64 ( SeedSeq &  sequence)
inlineexplicit

Member Function Documentation

◆ discard()

constexpr void randlib::Pcg64::discard ( unsigned long long  n)
inlineconstexprnoexcept

◆ max()

static constexpr result_type randlib::Pcg64::max ( )
inlinestaticconstexprnoexcept

◆ min()

static constexpr result_type randlib::Pcg64::min ( )
inlinestaticconstexprnoexcept

◆ operator()()

constexpr result_type randlib::Pcg64::operator() ( )
inlineconstexprnoexcept

◆ seed() [1/2]

template<class SeedSeq >
requires (!std::convertible_to<SeedSeq &, std::uint64_t>)
void randlib::Pcg64::seed ( SeedSeq &  sequence)
inline

◆ seed() [2/2]

constexpr void randlib::Pcg64::seed ( std::uint64_t  value,
std::uint64_t  stream = default_stream 
)
inlineconstexprnoexcept

pcg_engines::setseq_xsl_rr_128_64(seed, stream) with 64-bit seed and stream

Friends And Related Symbol Documentation

◆ operator==

constexpr bool operator== ( const Pcg64 &  ,
const Pcg64 &   
)
friend

Member Data Documentation

◆ default_seed

constexpr std::uint64_t randlib::Pcg64::default_seed = 0xCAFEF00DD15EA5E5ULL
staticconstexpr

◆ default_stream

constexpr std::uint64_t randlib::Pcg64::default_stream = 0
staticconstexpr

The documentation for this class was generated from the following file: