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