|
RandX 1.4.3
基于 xoshiro/xoroshiro 算法族的纯头文件伪随机数生成器库
|
Xoshiro256** 伪随机数生成器,64 位输出,周期 2^256-1。 更多...
#include <RandX.hpp>


Public 类型 | |
| using | result_type |
| using | state_type |
| < 输出类型 | |
| Public 类型 继承自 RandX::detail::EngineBase< Xoshiro256StarStar, std::uint64_t, 4 > | |
| using | result_type |
| using | state_type |
Public 成员函数 | |
| constexpr | Xoshiro256StarStar () noexcept |
| < 状态类型(4×uint64) | |
| constexpr | Xoshiro256StarStar (std::uint64_t seed) noexcept |
| 以指定种子构造引擎 | |
| template<class SeedSeq> requires (!std::same_as<std::remove_cvref_t<SeedSeq>, Xoshiro256StarStar>) | |
| constexpr | Xoshiro256StarStar (SeedSeq &seq) |
| 从 std::seed_seq 播种 | |
| constexpr | Xoshiro256StarStar (state_type state) noexcept |
| 从状态数组直接构造 | |
| constexpr result_type | operator() () noexcept |
| 生成下一个 64 位随机数 | |
| constexpr void | jump () noexcept |
| 前进 2^128 步,用于创建并行子序列 | |
| constexpr void | longJump () noexcept |
| 前进 2^192 步,用于创建更稀疏的并行子序列 | |
| constexpr | Xoshiro256StarStar () noexcept |
| < 状态类型(4×uint64) | |
| RANDX_NODISCARD_CXX20 constexpr | Xoshiro256StarStar (std::uint64_t seed) noexcept |
| 以指定种子构造引擎 | |
| template<class SeedSeq, std::enable_if_t<!std::is_same_v< std::decay_t< SeedSeq >, Xoshiro256StarStar > > * = nullptr> | |
| RANDX_NODISCARD_CXX20 constexpr | Xoshiro256StarStar (SeedSeq &seq) |
| 从 std::seed_seq 播种 | |
| RANDX_NODISCARD_CXX20 constexpr | Xoshiro256StarStar (state_type state) noexcept |
| 从状态数组直接构造 | |
| constexpr result_type | operator() () noexcept |
| 生成下一个 64 位随机数 | |
| constexpr void | jump () noexcept |
| 前进 2^128 步,用于创建并行子序列 | |
| constexpr void | longJump () noexcept |
| 前进 2^192 步,用于创建更稀疏的并行子序列 | |
| Public 成员函数 继承自 RandX::detail::EngineBase< Xoshiro256StarStar, 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< Xoshiro256StarStar, 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< Xoshiro256StarStar, 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< Xoshiro256StarStar, std::uint64_t, 4 > | |
| state_type | s_ |
| 静态 Protected 属性 继承自 RandX::detail::EngineBase< Xoshiro256StarStar, std::uint64_t, 4 > | |
| static constexpr int | Bits |
Xoshiro256** 伪随机数生成器,64 位输出,周期 2^256-1。
通用首选引擎,统计质量最优。状态 32 字节(4×uint64)。 满足 std::uniform_random_bit_generator 概念。 原始实现:http://prng.di.unimi.it/xoshiro256starstar.c(版本 1.0)
| using RandX::detail::EngineBase< Xoshiro256StarStar, std::uint64_t, N >::result_type |
| using RandX::detail::EngineBase< Xoshiro256StarStar, std::uint64_t, N >::state_type |
< 输出类型
|
inlineconstexprnoexcept |
< 状态类型(4×uint64)
默认构造(使用 DefaultSeed)
|
inlineexplicitconstexprnoexcept |
以指定种子构造引擎
| seed | 64 位种子值 |
|
inlineexplicitconstexpr |
从 std::seed_seq 播种
| seq | 种子序列对象 |
|
inlineexplicitconstexprnoexcept |
从状态数组直接构造
| state | serialize() 返回的状态 |
|
constexprnoexcept |
|
constexprnoexcept |
|
constexprnoexcept |