aivika-transformers-4.5: Transformers for the Aivika simulation library

Simulation.Aivika.Trans.Generator.Primitive

Description

Tested with: GHC 8.0.1

This helper module defines primitives for generating random numbers.

Synopsis

Documentation

Arguments

 :: Monad m => m Double the uniform random number ~ U (0, 1) -> Double minimum -> Double maximum -> m Double

Generate an uniform random number with the specified minimum and maximum.

Arguments

 :: Monad m => m Double the uniform random number ~ U (0, 1) -> Int minimum -> Int maximum -> m Int

Generate an uniform random number with the specified minimum and maximum.

Arguments

 :: Monad m => m Double the uniform random number ~ U (0, 1) -> Double minimum -> Double median -> Double maximum -> m Double

Generate the triangular random number by the specified minimum, median and maximum.

Arguments

 :: Monad m => m Double the normal random number ~ N (0, 1) -> Double mean -> Double variance -> m Double

Generate a normal random number by the specified generator, mean and variance.

Arguments

 :: Monad m => m Double the normal random number ~ N (0, 1) -> Double mean -> Double variance -> m Double

Generate the lognormal random number derived from a normal distribution with the specified generator, mean and variance.

Arguments

 :: Monad m => m Double the uniform random number ~ U (0, 1) -> Double the mean -> m Double

Return the exponential random number with the specified mean.

Arguments

 :: Monad m => m Double the uniform random number ~ U (0, 1) -> Double the scale -> Int the shape -> m Double

Return the Erlang random number.

Arguments

 :: Monad m => m Double the uniform random number ~ U (0, 1) -> Double the mean -> m Int

Generate the Poisson random number with the specified mean.

Arguments

 :: Monad m => m Double the uniform random number ~ U (0, 1) -> Double the probability -> Int the number of trials -> m Int

Generate a binomial random number with the specified probability and number of trials.

Arguments

 :: Monad m => m Double the normal random number ~ N (0,1) -> m Double the uniform random number ~ U (0, 1) -> Double the shape parameter (kappa) -> Double the scale parameter (theta) -> m Double

Generate a random number from the Gamma distribution using Marsaglia and Tsang method.

Arguments

 :: Monad m => m Double the normal random number ~ N (0, 1) -> m Double the uniform random number ~ U (0, 1) -> Double the shape parameter alpha -> Double the shape parameter beta -> m Double

Generate a random number from the Beta distribution.

Arguments

 :: Monad m => m Double the uniform random number ~ U (0, 1) -> Double shape -> Double scale -> m Double

Generate a random number from the Weibull distribution.

Arguments

 :: Monad m => m Double the uniform random number ~ U (0, 1) -> DiscretePDF a a discrete probability density function -> m a

Generate a random value from the specified discrete distribution.