| Portability | uses ffi |
|---|---|
| Stability | provisional |
| Maintainer | haskell.vivian.mcphail <at> gmail <dot> com |
Numeric.GSL.Distribution.Discrete
Description
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
Constructors
| Poisson | mean |
| Bernoulli | probability |
| Geometric | probability |
| Logarithmic | probability |
Instances
data TwoParamDist Source
Constructors
| Binomial | probability, successes |
| NegBinomial | probability, successes |
| Pascal | probability, n |
Instances
Arguments
| :: OneParamDist | distribution type |
| -> Int | random seed |
| -> Double | parameter |
| -> Int | result |
draw a sample from a one parameter distribution
Arguments
| :: OneParamDist | density type |
| -> DistFunc | distribution function type |
| -> Double | parameter |
| -> Int | value |
| -> Double | result |
probability of a variate take a value outside the argument
Arguments
| :: TwoParamDist | distribution type |
| -> Int | random seed |
| -> Double | parameter 1 |
| -> Int | parameter 2 |
| -> Int | result |
draw a sample from a two parameter distribution
Arguments
| :: 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
Arguments
| :: 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
Arguments
| :: 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
Arguments
| :: MultiParamDist | distribution type |
| -> Int | random seed |
| -> Int | trials |
| -> Vector Double | parameters |
| -> Vector Int | result |
draw a sample from a three parameter distribution