-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Bindings the the GSL random number generation facilities.
--
-- Bindings to the GNU Scientific Library random number generators and
-- random distributions.
@package gsl-random
@version 0.2
-- | Random number distributions. Functions for generating random variates
-- and computing their probability distributions.
module GSL.Random.Dist
-- | gaussianPdf x sigma computes the probabililty density p(x)
-- for a Gaussian distribution with mean 0 and standard
-- deviation sigma.
gaussianPdf :: Double -> Double -> Double
-- | gaussianP x sigma computes the cumulative distribution
-- function P(x) for a Gaussian distribution with mean 0 and
-- standard deviation sigma.
gaussianP :: Double -> Double -> Double
-- | gaussianQ x sigma computes the cumulative distribution
-- function Q(x) for a Gaussian distribution with mean 0 and
-- standard deviation sigma.
gaussianQ :: Double -> Double -> Double
-- | gaussianPInv p sigma computes the inverse of the cumulative
-- distribution function of a Gaussian distribution with mean 0
-- and standard deviation sigma. It returns x such that
-- P(x) = p.
gaussianPInv :: Double -> Double -> Double
-- | gaussianPInv q sigma computes the inverse of the cumulative
-- distribution function of a Gaussian distribution with mean 0
-- and standard deviation sigma. It returns x such that
-- Q(x) = q.
gaussianQInv :: Double -> Double -> Double
-- | getGaussian r sigma gets a normal random variable with mean
-- 0 and standard deviation sigma. This uses the
-- Box-Mueller algorithm.
getGaussian :: RNG -> Double -> IO Double
-- | getGaussianZiggurat r sigma gets a normal random variable
-- with mean 0 and standard deviation sigma. This uses
-- the Marsaglia-Tsang ziggurat algorithm.
getGaussianZiggurat :: RNG -> Double -> IO Double
-- | getGaussianRatioMethod r sigma gets a normal random variable
-- with mean 0 and standard deviation sigma. This uses
-- the Kinderman-Monahan-Leva ratio method.
getGaussianRatioMethod :: RNG -> Double -> IO Double
-- | ugaussianPdf x computes the probabililty density p(x) for a
-- Gaussian distribution with mean 0 and standard deviation
-- 1.
ugaussianPdf :: Double -> Double
-- | ugaussianP x computes the cumulative distribution function
-- P(x) for a Gaussian distribution with mean 0 and standard
-- deviation 1.
ugaussianP :: Double -> Double
-- | ugaussianQ x computes the cumulative distribution function
-- Q(x) for a Gaussian distribution with mean 0 and standard
-- deviation 1.
ugaussianQ :: Double -> Double
-- | ugaussianPInv p computes the inverse of the cumulative
-- distribution function of a Gaussian distribution with mean 0
-- and standard deviation 1. It returns x such that
-- P(x) = p.
ugaussianPInv :: Double -> Double
-- | ugaussianPInv q computes the inverse of the cumulative
-- distribution function of a Gaussian distribution with mean 0
-- and standard deviation 1. It returns x such that
-- Q(x) = q.
ugaussianQInv :: Double -> Double
-- | getUGaussian r gets a normal random variable with mean
-- 0 and standard deviation 1. This uses the
-- Box-Mueller algorithm.
getUGaussian :: RNG -> IO Double
-- | getUGaussianZiggurat r gets a normal random variable with
-- mean 0 and standard deviation 1. This uses the
-- Marsaglia-Tsang ziggurat algorithm.
getUGaussianZiggurat :: RNG -> IO Double
-- | getUGaussianRatioMethod r gets a normal random variable with
-- mean 0 and standard deviation 1. This uses the
-- Kinderman-Monahan-Leva ratio method.
getUGaussianRatioMethod :: RNG -> IO Double
-- | flatPdf x a b computes the probability density p(x)
-- at x for a uniform distribution from a to
-- b.
flatPdf :: Double -> Double -> Double -> Double
-- | flatP x a b computes the cumulative distribution function
-- P(x).
flatP :: Double -> Double -> Double -> Double
-- | flatQ x a b computes the cumulative distribution function
-- Q(x).
flatQ :: Double -> Double -> Double -> Double
-- | flatPInv p a b computes the inverse of the cumulative
-- distribution and returns x so that function P(x) =
-- p.
flatPInv :: Double -> Double -> Double -> Double
-- | flatQInv q a b computes the inverse of the cumulative
-- distribution and returns x so that function Q(x) =
-- q.
flatQInv :: Double -> Double -> Double -> Double
-- | getFlat r a b gets a value uniformly chosen in
-- [a,b).
getFlat :: RNG -> Double -> Double -> IO (Double)
-- | poissonPdf k mu evaluates the probability density
-- p(k) at k for a Poisson distribution with mean
-- mu.
poissonPdf :: Int -> Double -> Double
-- | poissonP k mu evaluates the cumulative distribution function
-- P(k) at k for a Poisson distribution with mean
-- mu.
poissonP :: Int -> Double -> Double
-- | poissonQ k mu evaluates the cumulative distribution function
-- Q(k) at k for a Poisson distribution with mean
-- mu.
poissonQ :: Int -> Double -> Double
-- | getPoisson r mu gets a poisson random variable with mean
-- mu.
getPoisson :: RNG -> Double -> IO Int
-- | Random number generators.
module GSL.Random.Gen
newtype RNG
MkRNG :: (ForeignPtr ()) -> RNG
data RNGType
-- | Allocate a new random number generator of the given type and
-- initialize it with the default seed.
newRNG :: RNGType -> IO RNG
-- | Seed the generator with the given value.
setSeed :: RNG -> Word64 -> IO ()
-- | Returns a value uniform in [rngMin, rngMax]
getSample :: RNG -> IO Word64
-- | Returns a value uniform on [0,1)
getUniform :: RNG -> IO Double
-- | Returns a value uniform on (0,1)
getUniformPos :: RNG -> IO Double
-- | Returns an integer uniform on [0,n-1]. n must be greater than
-- 0.
getUniformInt :: RNG -> Int -> IO Int
-- | Get the name of the generator.
getName :: RNG -> IO String
-- | Get the largest value that the generator can return.
getMax :: RNG -> IO Word64
-- | Get the smallest value that the generator can return.
getMin :: RNG -> IO Word64
-- | Get the size of the generator state, in bytes.
getSize :: RNG -> IO Word64
-- | Get the generator state.
getState :: RNG -> IO [Word8]
-- | Set the generator state. The input array should have size equal to
-- getSize of the generator; otherwise, strange things will
-- happen.
setState :: RNG -> [Word8] -> IO ()
-- | copyRNG dst src copies the state from one generator to
-- another. The two generators must have the same type.
copyRNG :: RNG -> RNG -> IO ()
-- | Allocate a new random number generator that is an exact copy of
-- another generator
cloneRNG :: RNG -> IO RNG
mt19937 :: RNGType