Random123-0.2.0: Haskell port of Random123 library

Safe HaskellNone
LanguageHaskell98

System.Random.Random123.Philox

Description

Philox, a counter-based random number generator (keyed bijection function). Characterized by a low number of rounds involving relatively expensive computations.

Synopsis

Documentation

philox2 Source

Arguments

:: PhiloxWord a 
=> a

key,

-> Array2 a

counter,

-> Array2 a

random number.

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

philox4 Source

Arguments

:: PhiloxWord a 
=> Array2 a

key,

-> Array4 a

counter,

-> Array4 a

random number.

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

philox2R Source

Arguments

:: PhiloxWord a 
=> Int

number of rounds (1-16),

-> a

key,

-> Array2 a

counter,

-> Array2 a

random number.

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

philox4R Source

Arguments

:: PhiloxWord a 
=> Int

number of rounds (1-16),

-> Array2 a

key,

-> Array4 a

counter,

-> Array4 a

random number.

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

class (Bits a, Num a) => PhiloxWord a Source

Class of integer types suitable for use in Philox algorithm.

Minimal complete definition

mulhilo, philoxW_0, philoxW_1, philoxM2, philoxM4_0, philoxM4_1