Module mersenne

Types

MersenneTwister = MTState
Mersenne Twister (MT19937). Based on http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html
  • Period: 2^19937
  • State: 2496 bytes + int
  Source

Procs

proc randomUint32(self: var MersenneTwister): uint32 {.inline, raises: [], 
    tags: [].}
  Source
proc random(self: var MersenneTwister): float64 {.inline, raises: [], tags: [].}
  Source
proc initMersenneTwister(seed: openArray[uint32]): MersenneTwister {.raises: [], 
    tags: [].}
Seeds a new MersenneTwister with an array of uint32   Source
proc initMersenneTwister(seed: openArray[uint8]): MersenneTwister {.raises: [], 
    tags: [].}
Seeds a new MersenneTwister with an array of bytes   Source
proc initMersenneTwister(seed: uint32): MersenneTwister {.raises: [], tags: [].}
Seeds a new MersenneTwister with an uint32   Source