Copyright | [2014..2015] Trevor L. McDonell |
---|---|
License | BSD3 |
Maintainer | Trevor L. McDonell <tmcdonell@cse.unsw.edu.au> |
Stability | experimental |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Random number generation backed by MWC.
- type (:~>) sh e = sh -> GenIO -> IO e
- uniform :: (Shape sh, Elt e, Variate e) => sh :~> e
- uniformR :: (Shape sh, Elt e, Variate e) => (e, e) -> sh :~> e
- randomArray :: (Shape sh, Elt e) => (sh :~> e) -> sh -> IO (Array sh e)
- randomArrayWith :: (Shape sh, Elt e) => GenIO -> (sh :~> e) -> sh -> IO (Array sh e)
- module System.Random.MWC
Generating random arrays
uniformR :: (Shape sh, Elt e, Variate e) => (e, e) -> sh :~> e Source #
Uniformly distributed random variates in a given range.
randomArray :: (Shape sh, Elt e) => (sh :~> e) -> sh -> IO (Array sh e) Source #
Generate an array of random values. The generator for variates is
seeded from the system's fast source of pseudo-random numbers (see:
createSystemRandom
)
randomArrayWith :: (Shape sh, Elt e) => GenIO -> (sh :~> e) -> sh -> IO (Array sh e) Source #
Generate an array of random values using the supplied generator.
Re-export MWC-Random
module System.Random.MWC