Random123-0.1.2: Haskell port of Random123 library

Safe HaskellSafe-Inferred

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

philox2Source

Arguments

:: PhiloxWord a 
=> a

key,

-> Array2 a

counter,

-> Array2 a

random number.

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

philox4Source

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.

philox2RSource

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.

philox4RSource

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.