Safe Haskell | Safe-Inferred |
---|
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
:: PhiloxWord a | |
=> a | key, |
-> Array2 a | counter, |
-> Array2 a | random number. |
Generates a Philox-2 random number with the optimal number of rounds.
:: PhiloxWord a | |
=> Array2 a | key, |
-> Array4 a | counter, |
-> Array4 a | random number. |
Generates a Philox-4 random number with the optimal number of rounds.
:: 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.
:: 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.