|
RandX 1.4.3
基于 xoshiro/xoroshiro 算法族的纯头文件伪随机数生成器库
|
SFC64(Small Fast Counter)伪随机数生成器,64 位输出,周期 >= 2^64。 更多...
#include <RandX.hpp>


Public 类型 | |
| using | result_type |
| using | state_type |
| < 输出类型 | |
| Public 类型 继承自 RandX::detail::EngineBase< SFC64, std::uint64_t, 4 > | |
| using | result_type |
| using | state_type |
Public 成员函数 | |
| constexpr | SFC64 () noexcept |
| < 状态类型(4×uint64) | |
| constexpr | SFC64 (std::uint64_t seed) noexcept |
| 以指定种子构造引擎(SplitMix64 填充 3 状态字 + counter=1 + 12 轮预热) | |
| template<class SeedSeq> requires (!std::same_as<std::remove_cvref_t<SeedSeq>, SFC64>) | |
| constexpr | SFC64 (SeedSeq &seq) |
| 从 std::seed_seq 播种(填充 3 状态字 + counter=1 + 12 轮预热) | |
| constexpr | SFC64 (state_type state) noexcept |
| 从状态数组直接构造 | |
| constexpr result_type | operator() () noexcept |
| 生成下一个 64 位随机数 | |
| constexpr | SFC64 () noexcept |
| < 状态类型(4×uint64) | |
| RANDX_NODISCARD_CXX20 constexpr | SFC64 (std::uint64_t seed) noexcept |
| 以指定种子构造引擎(SplitMix64 填充 3 状态字 + counter=1 + 12 轮预热) | |
| template<class SeedSeq, std::enable_if_t<!std::is_same_v< std::decay_t< SeedSeq >, SFC64 > > * = nullptr> | |
| RANDX_NODISCARD_CXX20 constexpr | SFC64 (SeedSeq &seq) |
| 从 std::seed_seq 播种(填充 3 状态字 + counter=1 + 12 轮预热) | |
| RANDX_NODISCARD_CXX20 constexpr | SFC64 (state_type state) noexcept |
| 从状态数组直接构造 | |
| constexpr result_type | operator() () noexcept |
| 生成下一个 64 位随机数 | |
| template<class SeedSeq, std::enable_if_t<!std::is_same_v< std::decay_t< SeedSeq >, SFC64 > > *> | |
| constexpr | SFC64 (SeedSeq &seq) |
| Public 成员函数 继承自 RandX::detail::EngineBase< SFC64, std::uint64_t, 4 > | |
| 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 成员函数 继承自 RandX::detail::EngineBase< SFC64, std::uint64_t, 4 > | |
| 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 成员函数 继承自 RandX::detail::EngineBase< SFC64, std::uint64_t, 4 > | |
| EngineBase ()=default | |
| constexpr | EngineBase (const state_type &state) noexcept |
| constexpr | EngineBase (SeedSeq &seq) |
| constexpr | EngineBase (std::uint64_t seed) noexcept |
| constexpr void | jumpPoly (const std::uint64_t(&poly)[K]) noexcept |
| EngineBase ()=default | |
| constexpr | EngineBase (const state_type &state) noexcept |
| constexpr | EngineBase (SeedSeq &seq) |
| constexpr | EngineBase (std::uint64_t seed) noexcept |
| constexpr void | jumpPoly (const std::uint64_t(&poly)[K]) noexcept |
| Protected 属性 继承自 RandX::detail::EngineBase< SFC64, std::uint64_t, 4 > | |
| state_type | s_ |
| 静态 Protected 属性 继承自 RandX::detail::EngineBase< SFC64, std::uint64_t, 4 > | |
| static constexpr int | Bits |
SFC64(Small Fast Counter)伪随机数生成器,64 位输出,周期 >= 2^64。
状态 32 字节(4×uint64)。由 Chris Doty-Humphrey(PractRand)设计, 速度极快,通过 PractRand 全部统计测试。满足 std::uniform_random_bit_generator 概念。
| using RandX::detail::EngineBase< SFC64, std::uint64_t, N >::result_type |
| using RandX::detail::EngineBase< SFC64, std::uint64_t, N >::state_type |
< 输出类型
|
inlineconstexprnoexcept |
< 状态类型(4×uint64)
默认构造(使用 DefaultSeed)

|
explicitconstexprnoexcept |
以指定种子构造引擎(SplitMix64 填充 3 状态字 + counter=1 + 12 轮预热)
| seed | 64 位种子值 |

|
explicitconstexpr |
从 std::seed_seq 播种(填充 3 状态字 + counter=1 + 12 轮预热)
| seq | 种子序列对象 |
|
inlineexplicitconstexprnoexcept |
从状态数组直接构造
| state | serialize() 返回的状态 |
|
inlineconstexpr |

|
constexprnoexcept |