Safe Haskell | None |
---|

Threefry, a counter-based random number generator (keyed bijection function). Characterized by a high number of rounds involving relatively cheap computations.

- threefry2 :: (ThreefryWord a, Bits a, Num a) => Array2 a -> Array2 a -> Array2 a
- threefry4 :: (ThreefryWord a, Bits a, Num a) => Array4 a -> Array4 a -> Array4 a
- threefry2R :: (ThreefryWord a, Bits a, Num a) => Int -> Array2 a -> Array2 a -> Array2 a
- threefry4R :: (ThreefryWord a, Bits a, Num a) => Int -> Array4 a -> Array4 a -> Array4 a
- class ThreefryWord a

# Documentation

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

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

:: (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.

:: (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.