Random123-0.2.0: Haskell port of Random123 library

Safe HaskellNone
LanguageHaskell98

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

threefry2 Source

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.

threefry4 Source

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.

threefry2R Source

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.

threefry4R Source

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.

Minimal complete definition

parityConstant, rotationConstant2, rotationConstant4_0, rotationConstant4_1