Copyright | Copyright (c) 2009-2013, David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
Tested with: GHC 7.6.3
Below is defined a type class of the random number generator.
- data Generator = Generator {
- generatorUniform :: Double -> Double -> IO Double
- generatorNormal :: Double -> Double -> IO Double
- generatorExponential :: Double -> IO Double
- generatorErlang :: Double -> Int -> IO Double
- generatorPoisson :: Double -> IO Int
- generatorBinomial :: Double -> Int -> IO Int
- data GeneratorType
- newGenerator :: GeneratorType -> IO Generator
- newRandomGenerator :: RandomGen g => g -> IO Generator
Documentation
Defines a random number generator.
Generator | |
|
data GeneratorType Source
Defines a type of the random number generator.
SimpleGenerator | The simple random number generator. |
SimpleGeneratorWithSeed Int | The simple random number generator with the specified seed. |
CustomGenerator (IO Generator) | The custom random number generator. |
newGenerator :: GeneratorType -> IO Generator Source
Create a new random number generator by the specified type.
newRandomGenerator :: RandomGen g => g -> IO Generator Source
Create a new random generator by the specified standard generator.