Portability | uses ffi |
---|---|
Stability | provisional |
Maintainer | haskell.vivian.mcphail <at> gmail <dot> com |
GSL discrete random distribution functions
- data OneParamDist
- = Poisson
- | Bernoulli
- | Geometric
- | Logarithmic
- data TwoParamDist
- = Binomial
- | NegBinomial
- | Pascal
- data ThreeParamDist = HyperGeometric
- data MultiParamDist = Multinomial
- data DistFunc
- random_1p :: OneParamDist -> Int -> Double -> Int
- density_1p :: OneParamDist -> DistFunc -> Double -> Int -> Double
- random_2p :: TwoParamDist -> Int -> Double -> Int -> Int
- density_2p :: TwoParamDist -> DistFunc -> Double -> Int -> Int -> Double
- random_3p :: ThreeParamDist -> Int -> Int -> Int -> Int -> Int
- density_3p :: ThreeParamDist -> DistFunc -> Int -> Int -> Int -> Int -> Double
- random_mp :: MultiParamDist -> Int -> Int -> Vector Double -> Vector Int
- density_mp :: MultiParamDist -> DistFunc -> Vector Double -> Vector Int -> Double
Documentation
data OneParamDist Source
Poisson | mean |
Bernoulli | probability |
Geometric | probability |
Logarithmic | probability |
data TwoParamDist Source
Binomial | probability, successes |
NegBinomial | probability, successes |
Pascal | probability, n |
:: OneParamDist | distribution type |
-> Int | random seed |
-> Double | parameter |
-> Int | result |
draw a sample from a one parameter distribution
:: OneParamDist | density type |
-> DistFunc | distribution function type |
-> Double | parameter |
-> Int | value |
-> Double | result |
probability of a variate take a value outside the argument
:: TwoParamDist | distribution type |
-> Int | random seed |
-> Double | parameter 1 |
-> Int | parameter 2 |
-> Int | result |
draw a sample from a two parameter distribution
:: TwoParamDist | density type |
-> DistFunc | distribution function type |
-> Double | parameter 1 |
-> Int | parameter 2 |
-> Int | value |
-> Double | result |
probability of a variate take a value outside the argument
:: ThreeParamDist | distribution type |
-> Int | random seed |
-> Int | parameter 1 |
-> Int | parameter 2 |
-> Int | parameter 3 |
-> Int | result |
draw a sample from a three parameter distribution
:: ThreeParamDist | density type |
-> DistFunc | distribution function type |
-> Int | parameter 1 |
-> Int | parameter 2 |
-> Int | parameter 3 |
-> Int | value |
-> Double | result |
probability of a variate take a value outside the argument
:: MultiParamDist | distribution type |
-> Int | random seed |
-> Int | trials |
-> Vector Double | parameters |
-> Vector Int | result |
draw a sample from a three parameter distribution