module Simulation.Aivika.Trans.Processor.Random
(randomUniformProcessor,
randomUniformIntProcessor,
randomTriangularProcessor,
randomNormalProcessor,
randomLogNormalProcessor,
randomExponentialProcessor,
randomErlangProcessor,
randomPoissonProcessor,
randomBinomialProcessor,
randomGammaProcessor,
randomBetaProcessor,
randomWeibullProcessor,
randomDiscreteProcessor) where
import Simulation.Aivika.Trans.DES
import Simulation.Aivika.Trans.Generator
import Simulation.Aivika.Trans.Process
import Simulation.Aivika.Trans.Process.Random
import Simulation.Aivika.Trans.Processor
randomUniformProcessor :: MonadDES m
=> Double
-> Double
-> Processor m a a
{-# INLINABLE randomUniformProcessor #-}
randomUniformProcessor :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Processor m a a
randomUniformProcessor Double
min Double
max =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomUniformProcess_ Double
min Double
max
randomUniformIntProcessor :: MonadDES m
=> Int
-> Int
-> Processor m a a
{-# INLINABLE randomUniformIntProcessor #-}
randomUniformIntProcessor :: forall (m :: * -> *) a. MonadDES m => Int -> Int -> Processor m a a
randomUniformIntProcessor Int
min Int
max =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *). MonadDES m => Int -> Int -> Process m ()
randomUniformIntProcess_ Int
min Int
max
randomTriangularProcessor :: MonadDES m
=> Double
-> Double
-> Double
-> Processor m a a
{-# INLINABLE randomTriangularProcessor #-}
randomTriangularProcessor :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Double -> Processor m a a
randomTriangularProcessor Double
min Double
median Double
max =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Double -> Process m ()
randomTriangularProcess_ Double
min Double
median Double
max
randomNormalProcessor :: MonadDES m
=> Double
-> Double
-> Processor m a a
{-# INLINABLE randomNormalProcessor #-}
randomNormalProcessor :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Processor m a a
randomNormalProcessor Double
mu Double
nu =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomNormalProcess_ Double
mu Double
nu
randomLogNormalProcessor :: MonadDES m
=> Double
-> Double
-> Processor m a a
{-# INLINABLE randomLogNormalProcessor #-}
randomLogNormalProcessor :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Processor m a a
randomLogNormalProcessor Double
mu Double
nu =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomLogNormalProcess_ Double
mu Double
nu
randomExponentialProcessor :: MonadDES m
=> Double
-> Processor m a a
{-# INLINABLE randomExponentialProcessor #-}
randomExponentialProcessor :: forall (m :: * -> *) a. MonadDES m => Double -> Processor m a a
randomExponentialProcessor Double
mu =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *). MonadDES m => Double -> Process m ()
randomExponentialProcess_ Double
mu
randomErlangProcessor :: MonadDES m
=> Double
-> Int
-> Processor m a a
{-# INLINABLE randomErlangProcessor #-}
randomErlangProcessor :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Int -> Processor m a a
randomErlangProcessor Double
beta Int
m =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *). MonadDES m => Double -> Int -> Process m ()
randomErlangProcess_ Double
beta Int
m
randomPoissonProcessor :: MonadDES m
=> Double
-> Processor m a a
{-# INLINABLE randomPoissonProcessor #-}
randomPoissonProcessor :: forall (m :: * -> *) a. MonadDES m => Double -> Processor m a a
randomPoissonProcessor Double
mu =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *). MonadDES m => Double -> Process m ()
randomPoissonProcess_ Double
mu
randomBinomialProcessor :: MonadDES m
=> Double
-> Int
-> Processor m a a
{-# INLINABLE randomBinomialProcessor #-}
randomBinomialProcessor :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Int -> Processor m a a
randomBinomialProcessor Double
prob Int
trials =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *). MonadDES m => Double -> Int -> Process m ()
randomBinomialProcess_ Double
prob Int
trials
randomGammaProcessor :: MonadDES m
=> Double
-> Double
-> Processor m a a
{-# INLINABLE randomGammaProcessor #-}
randomGammaProcessor :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Processor m a a
randomGammaProcessor Double
kappa Double
theta =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomGammaProcess_ Double
kappa Double
theta
randomBetaProcessor :: MonadDES m
=> Double
-> Double
-> Processor m a a
{-# INLINABLE randomBetaProcessor #-}
randomBetaProcessor :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Processor m a a
randomBetaProcessor Double
alpha Double
beta =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomBetaProcess_ Double
alpha Double
beta
randomWeibullProcessor :: MonadDES m
=> Double
-> Double
-> Processor m a a
{-# INLINABLE randomWeibullProcessor #-}
randomWeibullProcessor :: forall (m :: * -> *) a.
MonadDES m =>
Double -> Double -> Processor m a a
randomWeibullProcessor Double
alpha Double
beta =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *).
MonadDES m =>
Double -> Double -> Process m ()
randomWeibullProcess_ Double
alpha Double
beta
randomDiscreteProcessor :: MonadDES m
=> DiscretePDF Double
-> Processor m a a
{-# INLINABLE randomDiscreteProcessor #-}
randomDiscreteProcessor :: forall (m :: * -> *) a.
MonadDES m =>
DiscretePDF Double -> Processor m a a
randomDiscreteProcessor DiscretePDF Double
dpdf =
forall (m :: * -> *) a.
MonadDES m =>
Process m () -> Processor m a a
withinProcessor forall a b. (a -> b) -> a -> b
$
forall (m :: * -> *).
MonadDES m =>
DiscretePDF Double -> Process m ()
randomDiscreteProcess_ DiscretePDF Double
dpdf