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

Safe HaskellNone
LanguageHaskell2010

Stochastic.Distributions.Discrete

Documentation

mkBinomial :: forall a. RandomGen a => a -> Double -> Int -> Dist Source

mkBernoulli :: forall a. RandomGen a => a -> Double -> Dist Source

mkPoisson :: forall a. RandomGen a => a -> Double -> Dist Source

mkZipF :: forall a. RandomGen a => a -> Int -> Double -> Dist Source

mkGeometric :: forall a. RandomGen a => a -> Double -> Dist Source

data Dist Source

Constructors

forall a . RandomGen a => Uniform Int Int a 
Poisson Dist 
forall a . RandomGen a => Geometric Double a 
forall a . RandomGen a => Bernoulli Double a 
forall a . RandomGen a => Binomial Int Double DiscreteCache a 
forall a . RandomGen a => ZipF Int Double DiscreteCache a 

class DiscreteDistribution g where Source

Minimal complete definition

rand, cdf, cdf', pmf

Methods

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

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

cdf :: g -> Int -> Double Source

cdf' :: g -> Double -> Int Source

pmf :: g -> Int -> Double Source