struct Alea::Core::SplitMix64(N)

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:

Constructors

Class Method Summary

Constructor Detail

def self.new #

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 an UInt64.