struct

Alea::Core::SplitMix64(N)

Inherits Struct / Value / Object

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]

Constructors

Class methods

init_state(seed : UInt64)

Generate a state to be used by PRNGs as a StaticArray(UInt64, N).

@parameters:

  • seed: initial seed; it must be an UInt64.
Source

Instance methods

initialize
Source