Random123-0.1.2: Haskell port of Random123 library

Safe HaskellNone

System.Random.Random123.Threefry

Description

Threefry, a counter-based random number generator (keyed bijection function). Characterized by a high number of rounds involving relatively cheap computations.

Synopsis

Documentation

threefry2Source

Arguments

:: (ThreefryWord a, Bits a, Num a) 
=> Array2 a

key,

-> Array2 a

counter,

-> Array2 a

random number.

Generates a Threefry-2 random number with the optimal number of rounds.

threefry4Source

Arguments

:: (ThreefryWord a, Bits a, Num a) 
=> Array4 a

key,

-> Array4 a

counter,

-> Array4 a

random number.

Generates a Threefry-4 random number with the optimal number of rounds.

threefry2RSource

Arguments

:: (ThreefryWord a, Bits a, Num a) 
=> Int

number of rounds (1-32),

-> Array2 a

key,

-> Array2 a

counter,

-> Array2 a

random number.

Generates a Threefry-2 random number with a custom number of rounds.

threefry4RSource

Arguments

:: (ThreefryWord a, Bits a, Num a) 
=> Int

number of rounds (1-72),

-> Array4 a

key,

-> Array4 a

counter,

-> Array4 a

random number.

Generates a Threefry-4 random number with a custom number of rounds.

class ThreefryWord a Source

Class of integer types suitable for use in Threefry algorithm.