| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
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.
- philox2 :: PhiloxWord a => a -> Array2 a -> Array2 a
- philox4 :: PhiloxWord a => Array2 a -> Array4 a -> Array4 a
- philox2R :: PhiloxWord a => Int -> a -> Array2 a -> Array2 a
- philox4R :: PhiloxWord a => Int -> Array2 a -> Array4 a -> Array4 a
- class (Bits a, Num a) => PhiloxWord a
Documentation
Arguments
| :: PhiloxWord a | |
| => a | key, |
| -> Array2 a | counter, |
| -> Array2 a | random number. |
Generates a Philox-2 random number with the optimal number of rounds.
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.
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.
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
Instances