probability-0.2.7: Probabilistic Functional Programming

Safe HaskellSafe
LanguageHaskell98

Numeric.Probability.Simulation

Description

Simulation

Synopsis

Documentation

class C c where Source #

Simulation means to repeat a Rnd.change change many times and to accumulate all results into a distribution. Therefore, simulation can be regarded as an approximation of distributions through randomization.

The Sim class allows the overloading of simulation for different kinds of generators, namely transitions and Rnd.change changes:

  • Trans   a = a -> Dist a   ==>   c = Dist
  • RChange a = a -> Rnd.T a  ==>   c = Rnd.T = IO

Methods

(~.) :: (Fractional prob, Ord prob, Random prob, Ord a) => Int -> (a -> c a) -> Transition prob a infix 6 Source #

returns the final randomized transition

(~..) :: (Fractional prob, Ord prob, Random prob, Ord a) => (Int, Int) -> (a -> c a) -> RExpand prob a infix 6 Source #

returns the whole trace for a k-fold simulation

(~*.) :: (Fractional prob, Ord prob, Random prob, Ord a) => (Int, Int) -> (a -> c a) -> Transition prob a infix 8 Source #

returns the whole trace for a single simulation

Instances
C T Source # 
Instance details

Defined in Numeric.Probability.Simulation

Methods

(~.) :: (Fractional prob, Ord prob, Random prob, Ord a) => Int -> (a -> T a) -> Transition prob a Source #

(~..) :: (Fractional prob, Ord prob, Random prob, Ord a) => (Int, Int) -> (a -> T a) -> RExpand prob a Source #

(~*.) :: (Fractional prob, Ord prob, Random prob, Ord a) => (Int, Int) -> (a -> T a) -> Transition prob a Source #

(Num prob, Ord prob, Random prob) => C (T prob) Source # 
Instance details

Defined in Numeric.Probability.Simulation

Methods

(~.) :: (Fractional prob0, Ord prob0, Random prob0, Ord a) => Int -> (a -> T prob a) -> Transition prob0 a Source #

(~..) :: (Fractional prob0, Ord prob0, Random prob0, Ord a) => (Int, Int) -> (a -> T prob a) -> RExpand prob0 a Source #

(~*.) :: (Fractional prob0, Ord prob0, Random prob0, Ord a) => (Int, Int) -> (a -> T prob a) -> Transition prob0 a Source #