Copyright | Copyright (c) 2009-2016, David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Tested with: GHC 8.0.1
This module defines the random functions that always return the same values in the integration time points within a single simulation run. The values for another simulation run will be regenerated anew.
For example, the computations returned by these functions can be used in the equations of System Dynamics.
Also it is worth noting that the values are generated in a strong order starting
from starttime
with step dt
. This is how the memo0Dynamics
function
actually works.
- memoRandomUniformDynamics :: Dynamics Double -> Dynamics Double -> Simulation (Dynamics Double)
- memoRandomUniformIntDynamics :: Dynamics Int -> Dynamics Int -> Simulation (Dynamics Int)
- memoRandomTriangularDynamics :: Dynamics Double -> Dynamics Double -> Dynamics Double -> Simulation (Dynamics Double)
- memoRandomNormalDynamics :: Dynamics Double -> Dynamics Double -> Simulation (Dynamics Double)
- memoRandomLogNormalDynamics :: Dynamics Double -> Dynamics Double -> Simulation (Dynamics Double)
- memoRandomExponentialDynamics :: Dynamics Double -> Simulation (Dynamics Double)
- memoRandomErlangDynamics :: Dynamics Double -> Dynamics Int -> Simulation (Dynamics Double)
- memoRandomPoissonDynamics :: Dynamics Double -> Simulation (Dynamics Int)
- memoRandomBinomialDynamics :: Dynamics Double -> Dynamics Int -> Simulation (Dynamics Int)
- memoRandomGammaDynamics :: Dynamics Double -> Dynamics Double -> Simulation (Dynamics Double)
- memoRandomBetaDynamics :: Dynamics Double -> Dynamics Double -> Simulation (Dynamics Double)
- memoRandomWeibullDynamics :: Dynamics Double -> Dynamics Double -> Simulation (Dynamics Double)
- memoRandomDiscreteDynamics :: Unboxed a => Dynamics (DiscretePDF a) -> Simulation (Dynamics a)
Documentation
memoRandomUniformDynamics Source #
Computation that generates random numbers distributed uniformly and memoizes the numbers in the integration time points.
memoRandomUniformIntDynamics Source #
Computation that generates random integer numbers distributed uniformly and memoizes the numbers in the integration time points.
memoRandomTriangularDynamics Source #
:: Dynamics Double | minimum |
-> Dynamics Double | median |
-> Dynamics Double | maximum |
-> Simulation (Dynamics Double) |
Computation that generates random numbers from the triangular distribution and memoizes the numbers in the integration time points.
memoRandomNormalDynamics Source #
Computation that generates random numbers distributed normally and memoizes the numbers in the integration time points.
memoRandomLogNormalDynamics Source #
:: Dynamics Double | the mean of a normal distribution which this distribution is derived from |
-> Dynamics Double | the deviation of a normal distribution which this distribution is derived from |
-> Simulation (Dynamics Double) |
Computation that generates random numbers from the lognormal distribution and memoizes the numbers in the integration time points.
memoRandomExponentialDynamics Source #
:: Dynamics Double | the mean (a reciprocal of the rate) |
-> Simulation (Dynamics Double) |
Computation that generates exponential random numbers with the specified mean (the reciprocal of the rate) and memoizes the numbers in the integration time points.
memoRandomErlangDynamics Source #
:: Dynamics Double | the scale (a reciprocal of the rate) |
-> Dynamics Int | the shape |
-> Simulation (Dynamics Double) |
Computation that generates the Erlang random numbers with the specified scale (the reciprocal of the rate) and integer shape but memoizes the numbers in the integration time points.
memoRandomPoissonDynamics Source #
:: Dynamics Double | the mean |
-> Simulation (Dynamics Int) |
Computation that generats the Poisson random numbers with the specified mean and memoizes the numbers in the integration time points.
memoRandomBinomialDynamics Source #
Computation that generates binomial random numbers with the specified probability and trials but memoizes the numbers in the integration time points.
memoRandomGammaDynamics Source #
:: Dynamics Double | shape |
-> Dynamics Double | scale (a reciprocal of the rate) |
-> Simulation (Dynamics Double) |
Computation that generates random numbers from the Gamma distribution with the specified shape and scale but memoizes the numbers in the integration time points.
memoRandomBetaDynamics Source #
Computation that generates random numbers from the Beta distribution by the specified shape parameters and memoizes the numbers in the integration time points.
memoRandomWeibullDynamics Source #
Computation that generates random numbers from the Weibull distribution with the specified shape and scale but memoizes the numbers in the integration time points.
memoRandomDiscreteDynamics :: Unboxed a => Dynamics (DiscretePDF a) -> Simulation (Dynamics a) Source #
Computation that generates random values from the specified discrete distribution and memoizes the values in the integration time points.