| Copyright | (c) A. V. H. McPhail 2010, 2015 |
|---|---|
| License | BSD3 |
| Maintainer | haskell.vivian.mcphail <at> gmail <dot> com |
| Stability | provisional |
| Portability | uses ffi |
| Safe Haskell | None |
| Language | Haskell2010 |
Numeric.GSL.Distribution.Discrete
Description
GSL discrete random distribution functions
- data OneParamDist
- data TwoParamDist
- data ThreeParamDist = HyperGeometric
- data MultiParamDist = Multinomial
- data DistFunc
- random_1p :: OneParamDist -> Int -> Double -> Word32
- random_1p_v :: OneParamDist -> Int -> Double -> Int -> Vector Word32
- density_1p :: OneParamDist -> DistFunc -> Double -> Word32 -> Double
- random_2p :: TwoParamDist -> Int -> Double -> Word32 -> Word32
- random_2p_v :: TwoParamDist -> Int -> Double -> Word32 -> Int -> Vector Word32
- density_2p :: TwoParamDist -> DistFunc -> Double -> Word32 -> Word32 -> Double
- random_3p :: ThreeParamDist -> Int -> Word32 -> Word32 -> Word32 -> Word32
- random_3p_v :: ThreeParamDist -> Int -> Word32 -> Word32 -> Word32 -> Int -> Vector Word32
- density_3p :: ThreeParamDist -> DistFunc -> Word32 -> Word32 -> Word32 -> Word32 -> Double
- random_mp :: MultiParamDist -> Int -> Word32 -> Vector Double -> Vector Word32
- density_mp :: MultiParamDist -> DistFunc -> Vector Double -> Vector Word32 -> 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 |
| -> Word32 | result |
draw a sample from a one parameter distribution
Arguments
| :: OneParamDist | distribution type |
| -> Int | random seed |
| -> Double | parameter |
| -> Int | number of samples |
| -> Vector Word32 | result |
draw samples from a one parameter distribution
Arguments
| :: OneParamDist | density type |
| -> DistFunc | distribution function type |
| -> Double | parameter |
| -> Word32 | value |
| -> Double | result |
probability of a variate take a value outside the argument
Arguments
| :: TwoParamDist | distribution type |
| -> Int | random seed |
| -> Double | parameter 1 |
| -> Word32 | parameter 2 |
| -> Word32 | result |
draw a sample from a two parameter distribution
Arguments
| :: TwoParamDist | distribution type |
| -> Int | random seed |
| -> Double | parameter 1 |
| -> Word32 | parameter 2 |
| -> Int | number of samples |
| -> Vector Word32 | result |
draw samples from a two parameter distribution
Arguments
| :: TwoParamDist | density type |
| -> DistFunc | distribution function type |
| -> Double | parameter 1 |
| -> Word32 | parameter 2 |
| -> Word32 | value |
| -> Double | result |
probability of a variate take a value outside the argument
Arguments
| :: ThreeParamDist | distribution type |
| -> Int | random seed |
| -> Word32 | parameter 1 |
| -> Word32 | parameter 2 |
| -> Word32 | parameter 3 |
| -> Word32 | result |
draw a sample from a three parameter distribution
Arguments
| :: ThreeParamDist | distribution type |
| -> Int | random seed |
| -> Word32 | parameter 1 |
| -> Word32 | parameter 2 |
| -> Word32 | parameter 3 |
| -> Int | number of samples |
| -> Vector Word32 | result |
draw samples from a three parameter distribution
Arguments
| :: ThreeParamDist | density type |
| -> DistFunc | distribution function type |
| -> Word32 | parameter 1 |
| -> Word32 | parameter 2 |
| -> Word32 | parameter 3 |
| -> Word32 | value |
| -> Double | result |
probability of a variate take a value outside the argument
Arguments
| :: MultiParamDist | distribution type |
| -> Int | random seed |
| -> Word32 | trials |
| -> Vector Double | parameters |
| -> Vector Word32 | result |
draw a sample from a multi-parameter distribution