random-variates-0.1.0.0: "Uniform RNG => Non-Uniform RNGs"

Safe HaskellNone
LanguageHaskell2010

Stochastic.Distributions

Documentation

class ContinuousDistribution g where Source

Minimal complete definition

randDouble

Methods

randDouble :: g -> (Double, g) Source

randDoubles :: Int -> g -> ([Double], g) Source

class DiscreteDistribution g where Source

Minimal complete definition

Nothing

Methods

randInt :: g -> (Int, g) Source

randInts :: Int -> g -> ([Int], g) Source

randIntIn :: (Int, Int) -> g -> (Int, g) Source

data Distributions Source

Constructors

Distributions 

Fields

mkUniform :: Int -> Uniform
 
mkExp :: Int -> Double -> Exponential
 
mkNormal :: Int -> Double -> Double -> Normal
 
mkZipF :: Int -> Int -> Double -> ZipF
 
mkGeometric :: Int -> Double -> Geometric
 
mkPoisson :: Int -> Double -> Poisson
 
mkBernoulli :: Int -> Double -> Bernoulli
 
mkBinomial :: Int -> Double -> Int -> Binomial
 

liftD :: DiscreteDistribution g => (Int, Int) -> (Int -> a) -> g -> (a, g) Source

liftC :: ContinuousDistribution g => (Double -> a) -> g -> (a, g) Source

liftDN :: DiscreteDistribution g => [(Int, Int)] -> ([Int] -> a) -> g -> (a, g) Source

liftCN :: ContinuousDistribution g => Int -> ([Double] -> a) -> g -> (a, g) Source