OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::PRNG::SFMT19937_64 Class Reference

#include <SFMT.hpp>

Public Types

using State_t = detail::SFMT_T
 
using result_type = uint64
 生成される整数値の型 | The integral type generated by the engine More...
 

Public Member Functions

SIV3D_NODISCARD_CXX20 SFMT19937_64 ()
 乱数エンジンを作成し、内部状態を非決定的な乱数で初期化します。 | Constructs the engine and initializes the state with non-deterministic random numbers More...
 
SIV3D_NODISCARD_CXX20 SFMT19937_64 (uint64 seed) noexcept
 乱数エンジンを作成し、内部状態を初期化します。 | Constructs the engine and initializes the state. More...
 
SIV3D_NODISCARD_CXX20 SFMT19937_64 (const std::array< uint64, SeedSequencCount > &seeds) noexcept
 
void seed (uint64 seed) noexcept
 
void seed (const std::array< uint64, SeedSequencCount > &seeds) noexcept
 
result_type operator() () noexcept
 乱数を生成します。 | Generates a pseudo-random value. More...
 
double generateReal () noexcept
 [0, 1) の範囲の乱数を生成します。 | Generates a pseudo-random value in [0, 1) More...
 
constexpr const State_tserialize () const noexcept
 
constexpr void deserialize (const State_t &data) noexcept
 

Static Public Member Functions

static constexpr result_type min () noexcept
 生成される乱数の最小値を返します。 | Returns the minimum value potentially generated by the random-number engine More...
 
static constexpr result_type max () noexcept
 生成される乱数の最大値を返します。 | Returns the maximum value potentially generated by the random-number engine. More...
 

Static Public Attributes

static constexpr size_t SeedSequencCount = 16
 

Member Typedef Documentation

◆ result_type

生成される整数値の型 | The integral type generated by the engine

◆ State_t

using s3d::PRNG::SFMT19937_64::State_t = detail::SFMT_T

Constructor & Destructor Documentation

◆ SFMT19937_64() [1/3]

SIV3D_NODISCARD_CXX20 s3d::PRNG::SFMT19937_64::SFMT19937_64 ( )

乱数エンジンを作成し、内部状態を非決定的な乱数で初期化します。 | Constructs the engine and initializes the state with non-deterministic random numbers

◆ SFMT19937_64() [2/3]

SIV3D_NODISCARD_CXX20 s3d::PRNG::SFMT19937_64::SFMT19937_64 ( uint64  seed)
explicitnoexcept

乱数エンジンを作成し、内部状態を初期化します。 | Constructs the engine and initializes the state.

Parameters
seed内部状態の初期化に使われるシード値 | seed value to use in the initialization of the internal state

◆ SFMT19937_64() [3/3]

SIV3D_NODISCARD_CXX20 s3d::PRNG::SFMT19937_64::SFMT19937_64 ( const std::array< uint64, SeedSequencCount > &  seeds)
explicitnoexcept

Member Function Documentation

◆ deserialize()

constexpr void s3d::PRNG::SFMT19937_64::deserialize ( const State_t data)
constexprnoexcept

◆ generateReal()

double s3d::PRNG::SFMT19937_64::generateReal ( )
noexcept

[0, 1) の範囲の乱数を生成します。 | Generates a pseudo-random value in [0, 1)

Returns
生成された乱数 | A generated pseudo-random value

◆ max()

static constexpr result_type s3d::PRNG::SFMT19937_64::max ( )
staticconstexprnoexcept

生成される乱数の最大値を返します。 | Returns the maximum value potentially generated by the random-number engine.

Returns
生成される乱数の最大値 | The maximum potentially generated value

◆ min()

static constexpr result_type s3d::PRNG::SFMT19937_64::min ( )
staticconstexprnoexcept

生成される乱数の最小値を返します。 | Returns the minimum value potentially generated by the random-number engine

Returns
生成される乱数の最小値 | The minimum potentially generated value

◆ operator()()

result_type s3d::PRNG::SFMT19937_64::operator() ( )
noexcept

乱数を生成します。 | Generates a pseudo-random value.

Returns
生成された乱数 | A generated pseudo-random value

◆ seed() [1/2]

void s3d::PRNG::SFMT19937_64::seed ( const std::array< uint64, SeedSequencCount > &  seeds)
noexcept

◆ seed() [2/2]

void s3d::PRNG::SFMT19937_64::seed ( uint64  seed)
noexcept

◆ serialize()

constexpr const State_t& s3d::PRNG::SFMT19937_64::serialize ( ) const
constexprnoexcept

Member Data Documentation

◆ SeedSequencCount

constexpr size_t s3d::PRNG::SFMT19937_64::SeedSequencCount = 16
staticconstexpr

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