Stability | experimental |
---|---|
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Safe Haskell | Safe-Inferred |
Tested with: GHC 7.6.3
This module defines the parameters of simulation experiments.
- newParameter :: IO a -> IO (Simulation a)
- newTableParameter :: Array Int a -> IO (Simulation a)
- newIndexedParameter :: (Int -> IO a) -> IO (Simulation a)
- newRandomParameter :: Simulation Double -> Simulation Double -> IO (Simulation Double)
- newNormalParameter :: Simulation Double -> Simulation Double -> IO (Simulation Double)
Documentation
newParameter :: IO a -> IO (Simulation a)Source
Create a thread-safe parameter that returns always the same value within the simulation run, where the value is recalculated for each new run.
newTableParameter :: Array Int a -> IO (Simulation a)Source
Create a thread-safe parameter that returns always the same value within the simulation run, where the value is taken consequently from the specified table based on the number of the current run starting from zero. After all values from the table are used, it takes the first value of the table, then the second one and so on.
newIndexedParameter :: (Int -> IO a) -> IO (Simulation a)Source
Create a thread-safe parameter that returns always the same value within the simulation run, where the value depends on the number of this run starting from zero.
:: Simulation Double | minimum |
-> Simulation Double | maximum |
-> IO (Simulation Double) |
Create a new random parameter distributed uniformly. The value doesn't change within the simulation run but then the value is recalculated for each new run.
:: Simulation Double | mean |
-> Simulation Double | variance |
-> IO (Simulation Double) |
Create a new random parameter distributed normally. The value doesn't change within the simulation run but then the value is recalculated for each new run.