RandX 1.4.3
基于 xoshiro/xoroshiro 算法族的纯头文件伪随机数生成器库
载入中...
搜索中...
未找到
RandX::detail::EngineBase< Derived, ResultType, N > 模板结构体 参考

#include <RandX.hpp>

Public 类型

using result_type = ResultType
using state_type = std::array<ResultType, N>
using result_type = ResultType
using state_type = std::array<ResultType, N>

Public 成员函数

constexpr void discard (unsigned long long z) noexcept
constexpr state_type serialize () const noexcept
constexpr void deserialize (const state_type &s) noexcept
constexpr void discard (unsigned long long z) noexcept
constexpr state_type serialize () const noexcept
constexpr void deserialize (const state_type &s) noexcept

静态 Public 成员函数

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

Protected 成员函数

 EngineBase ()=default
constexpr EngineBase (const state_type &state) noexcept
template<class SeedSeq>
requires (!std::same_as<std::remove_cvref_t<SeedSeq>, state_type> && !std::same_as<std::remove_cvref_t<SeedSeq>, Derived>)
constexpr EngineBase (SeedSeq &seq)
constexpr EngineBase (std::uint64_t seed) noexcept
template<std::size_t K>
constexpr void jumpPoly (const ResultType(&poly)[K]) noexcept
 EngineBase ()=default
constexpr EngineBase (const state_type &state) noexcept
template<class SeedSeq, std::enable_if_t<!std::is_same_v< std::decay_t< SeedSeq >, state_type > &&!std::is_same_v< std::decay_t< SeedSeq >, Derived > > * = nullptr>
constexpr EngineBase (SeedSeq &seq)
constexpr EngineBase (std::uint64_t seed) noexcept
template<std::size_t K>
constexpr void jumpPoly (const ResultType(&poly)[K]) noexcept

Protected 属性

state_type s_ {}

静态 Protected 属性

static constexpr int Bits = static_cast<int>(sizeof(ResultType) * 8)

友元

auto operator<=> (const EngineBase &, const EngineBase &)=default
bool operator== (const EngineBase &lhs, const EngineBase &rhs) noexcept
bool operator!= (const EngineBase &lhs, const EngineBase &rhs) noexcept

成员类型定义说明

◆ result_type

template<class Derived, class ResultType, std::size_t N>
using RandX::detail::EngineBase< Derived, ResultType, N >::result_type = ResultType

◆ state_type

template<class Derived, class ResultType, std::size_t N>
using RandX::detail::EngineBase< Derived, ResultType, N >::state_type = std::array<ResultType, N>

构造及析构函数说明

◆ EngineBase() [1/4]

template<class Derived, class ResultType, std::size_t N>
RandX::detail::EngineBase< Derived, ResultType, N >::EngineBase ( )
protecteddefault

◆ EngineBase() [2/4]

template<class Derived, class ResultType, std::size_t N>
RandX::detail::EngineBase< Derived, ResultType, N >::EngineBase ( const state_type & state)
inlineexplicitconstexprprotectednoexcept

◆ EngineBase() [3/4]

template<class Derived, class ResultType, std::size_t N>
template<class SeedSeq, std::enable_if_t<!std::is_same_v< std::decay_t< SeedSeq >, state_type > &&!std::is_same_v< std::decay_t< SeedSeq >, Derived > > * = nullptr>
RandX::detail::EngineBase< Derived, ResultType, N >::EngineBase ( SeedSeq & seq)
inlineexplicitconstexprprotected

◆ EngineBase() [4/4]

template<class Derived, class ResultType, std::size_t N>
RandX::detail::EngineBase< Derived, ResultType, N >::EngineBase ( std::uint64_t seed)
inlineexplicitconstexprprotectednoexcept

成员函数说明

◆ deserialize()

template<class Derived, class ResultType, std::size_t N>
void RandX::detail::EngineBase< Derived, ResultType, N >::deserialize ( const state_type & s)
inlineconstexprnoexcept

◆ discard()

template<class Derived, class ResultType, std::size_t N>
void RandX::detail::EngineBase< Derived, ResultType, N >::discard ( unsigned long long z)
inlineconstexprnoexcept

◆ jumpPoly()

template<class Derived, class ResultType, std::size_t N>
template<std::size_t K>
void RandX::detail::EngineBase< Derived, ResultType, N >::jumpPoly ( const ResultType(&) poly[K])
inlineconstexprprotectednoexcept

◆ max()

template<class Derived, class ResultType, std::size_t N>
constexpr result_type RandX::detail::EngineBase< Derived, ResultType, N >::max ( )
inlinestaticnodiscardconstexprnoexcept

◆ min()

template<class Derived, class ResultType, std::size_t N>
constexpr result_type RandX::detail::EngineBase< Derived, ResultType, N >::min ( )
inlinestaticnodiscardconstexprnoexcept

◆ serialize()

template<class Derived, class ResultType, std::size_t N>
state_type RandX::detail::EngineBase< Derived, ResultType, N >::serialize ( ) const
inlinenodiscardconstexprnoexcept

◆ operator!=

template<class Derived, class ResultType, std::size_t N>
bool operator!= ( const EngineBase< Derived, ResultType, N > & lhs,
const EngineBase< Derived, ResultType, N > & rhs )
friend

◆ operator==

template<class Derived, class ResultType, std::size_t N>
bool operator== ( const EngineBase< Derived, ResultType, N > & lhs,
const EngineBase< Derived, ResultType, N > & rhs )
friend

该结构体的文档由以下文件生成: