module Simulation.Aivika.Net.Random
(randomUniformNet,
randomUniformIntNet,
randomTriangularNet,
randomNormalNet,
randomLogNormalNet,
randomExponentialNet,
randomErlangNet,
randomPoissonNet,
randomBinomialNet,
randomGammaNet,
randomBetaNet,
randomWeibullNet,
randomDiscreteNet) where
import Simulation.Aivika.Generator
import Simulation.Aivika.Process
import Simulation.Aivika.Process.Random
import Simulation.Aivika.Net
randomUniformNet :: Double
-> Double
-> Net a a
randomUniformNet :: Double -> Double -> Net a a
randomUniformNet Double
min Double
max =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process ()
randomUniformProcess_ Double
min Double
max
randomUniformIntNet :: Int
-> Int
-> Net a a
randomUniformIntNet :: Int -> Int -> Net a a
randomUniformIntNet Int
min Int
max =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Int -> Int -> Process ()
randomUniformIntProcess_ Int
min Int
max
randomTriangularNet :: Double
-> Double
-> Double
-> Net a a
randomTriangularNet :: Double -> Double -> Double -> Net a a
randomTriangularNet Double
min Double
median Double
max =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Double -> Process ()
randomTriangularProcess_ Double
min Double
median Double
max
randomNormalNet :: Double
-> Double
-> Net a a
randomNormalNet :: Double -> Double -> Net a a
randomNormalNet Double
mu Double
nu =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process ()
randomNormalProcess_ Double
mu Double
nu
randomLogNormalNet :: Double
-> Double
-> Net a a
randomLogNormalNet :: Double -> Double -> Net a a
randomLogNormalNet Double
mu Double
nu =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process ()
randomLogNormalProcess_ Double
mu Double
nu
randomExponentialNet :: Double
-> Net a a
randomExponentialNet :: Double -> Net a a
randomExponentialNet Double
mu =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Double -> Process ()
randomExponentialProcess_ Double
mu
randomErlangNet :: Double
-> Int
-> Net a a
randomErlangNet :: Double -> Int -> Net a a
randomErlangNet Double
beta Int
m =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Double -> Int -> Process ()
randomErlangProcess_ Double
beta Int
m
randomPoissonNet :: Double
-> Net a a
randomPoissonNet :: Double -> Net a a
randomPoissonNet Double
mu =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Double -> Process ()
randomPoissonProcess_ Double
mu
randomBinomialNet :: Double
-> Int
-> Net a a
randomBinomialNet :: Double -> Int -> Net a a
randomBinomialNet Double
prob Int
trials =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Double -> Int -> Process ()
randomBinomialProcess_ Double
prob Int
trials
randomGammaNet :: Double
-> Double
-> Net a a
randomGammaNet :: Double -> Double -> Net a a
randomGammaNet Double
kappa Double
theta =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process ()
randomGammaProcess_ Double
kappa Double
theta
randomBetaNet :: Double
-> Double
-> Net a a
randomBetaNet :: Double -> Double -> Net a a
randomBetaNet Double
alpha Double
beta =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process ()
randomBetaProcess_ Double
alpha Double
beta
randomWeibullNet :: Double
-> Double
-> Net a a
randomWeibullNet :: Double -> Double -> Net a a
randomWeibullNet Double
alpha Double
beta =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
Double -> Double -> Process ()
randomWeibullProcess_ Double
alpha Double
beta
randomDiscreteNet :: DiscretePDF Double
-> Net a a
randomDiscreteNet :: DiscretePDF Double -> Net a a
randomDiscreteNet DiscretePDF Double
dpdf =
Process () -> Net a a
forall a. Process () -> Net a a
withinNet (Process () -> Net a a) -> Process () -> Net a a
forall a b. (a -> b) -> a -> b
$
DiscretePDF Double -> Process ()
randomDiscreteProcess_ DiscretePDF Double
dpdf