Safe Haskell | Safe |
---|---|

Language | Haskell98 |

Approach: model a node with k predecessors as a function with k parameters

## Synopsis

- type Probability = Rational
- type Dist a = T Probability a
- type State a = [a]
- type PState a = Dist (State a)
- type STrans a = State a -> PState a
- type SPred a = a -> State a -> Bool
- event :: Probability -> a -> STrans a
- happens :: Eq a => SPred a
- network :: [STrans a] -> PState a
- source :: Probability -> a -> STrans a
- bin :: Eq a => a -> a -> Probability -> Probability -> Probability -> Probability -> a -> STrans a
- data Nodes
- g :: PState Nodes
- e :: Probability
- aE :: Probability
- bE :: Probability

# Abbreviations, smart constructors

type Probability = Rational Source #

type Dist a = T Probability a Source #

event :: Probability -> a -> STrans a Source #

source :: Probability -> a -> STrans a Source #

bin :: Eq a => a -> a -> Probability -> Probability -> Probability -> Probability -> a -> STrans a Source #

Two possible causes for one effect

# queries

e :: Probability Source #

aE :: Probability Source #

bE :: Probability Source #