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

The Xoshiro256pp class
xoshiro256++ 1.0 by David Blackman and Sebastiano Vigna: 256 bits of state, period 2^256 - 1. More...

#include <xoshiro.hpp>

Public Types

using result_type = std::uint64_t
 

Public Member Functions

constexpr Xoshiro256pp (std::uint64_t value=default_seed) noexcept
 
template<class SeedSeq >
requires (!std::convertible_to<SeedSeq &, std::uint64_t>)
 Xoshiro256pp (SeedSeq &sequence)
 
constexpr void seed (std::uint64_t value) noexcept
 Expands the seed with SplitMix64, as recommended by the authors.
 
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
 
constexpr void jump () noexcept
 Advances the state by 2^128 steps.
 
constexpr void long_jump () noexcept
 Advances the state by 2^192 steps.
 

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 = 0x853C49E6748FEA9BULL
 

Friends

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

Detailed Description

The Xoshiro256pp class
xoshiro256++ 1.0 by David Blackman and Sebastiano Vigna: 256 bits of state, period 2^256 - 1.

jump() advances the state by 2^128 steps and long_jump() by 2^192 steps, which gives non-overlapping streams for parallel simulations (see make_streams).

Member Typedef Documentation

◆ result_type

using randlib::Xoshiro256pp::result_type = std::uint64_t

Constructor & Destructor Documentation

◆ Xoshiro256pp() [1/2]

constexpr randlib::Xoshiro256pp::Xoshiro256pp ( std::uint64_t  value = default_seed)
inlineexplicitconstexprnoexcept

◆ Xoshiro256pp() [2/2]

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

Member Function Documentation

◆ discard()

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

◆ jump()

constexpr void randlib::Xoshiro256pp::jump ( )
inlineconstexprnoexcept

Advances the state by 2^128 steps.

◆ long_jump()

constexpr void randlib::Xoshiro256pp::long_jump ( )
inlineconstexprnoexcept

Advances the state by 2^192 steps.

◆ max()

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

◆ min()

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

◆ operator()()

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

◆ seed() [1/2]

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

◆ seed() [2/2]

constexpr void randlib::Xoshiro256pp::seed ( std::uint64_t  value)
inlineconstexprnoexcept

Expands the seed with SplitMix64, as recommended by the authors.

Friends And Related Symbol Documentation

◆ operator==

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

Member Data Documentation

◆ default_seed

constexpr std::uint64_t randlib::Xoshiro256pp::default_seed = 0x853C49E6748FEA9BULL
staticconstexpr

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