struct Alea::Core::SplitMix64(N)
- Alea::Core::SplitMix64(N)
- Struct
- Value
- Object
Overview
SplitMix64(N)
generator to initialize a N
sized state for the pseudo-random number generators.
NOTE N
refers to the size in bits of the state divided by 64.
The algorithm comes from http://prng.di.unimi.it/splitmix64.c.
state = Alea::Core::SplitMix64(2).init_state 93u64
state # => StaticArray[17266415801915045436, 2250649230797539417]
Defined in:
alea/core/cgen.crConstructors
Class Method Summary
-
.init_state(seed : UInt64)
Generate a state to be used by PRNGs as a
StaticArray(UInt64, N)
.
Instance Method Summary
Constructor Detail
Class Method Detail
def self.init_state(seed : UInt64)
#
Generate a state to be used by PRNGs as a StaticArray(UInt64, N)
.
@parameters:
seed
: initial seed; it must be anUInt64
.