probability-0.2.5.1: Probabilistic Functional Programming

Safe HaskellSafe
LanguageHaskell98

Numeric.Probability.Example.TreeGrowth

Contents

Synopsis

Documentation

type Height = Int #

data Tree #

Constructors

Alive Height 
Hit Height 
Fallen 

Instances

Eq Tree # 

Methods

(==) :: Tree -> Tree -> Bool #

(/=) :: Tree -> Tree -> Bool #

Ord Tree # 

Methods

compare :: Tree -> Tree -> Ordering #

(<) :: Tree -> Tree -> Bool #

(<=) :: Tree -> Tree -> Bool #

(>) :: Tree -> Tree -> Bool #

(>=) :: Tree -> Tree -> Bool #

max :: Tree -> Tree -> Tree #

min :: Tree -> Tree -> Tree #

Show Tree # 

Methods

showsPrec :: Int -> Tree -> ShowS #

show :: Tree -> String #

showList :: [Tree] -> ShowS #

seed :: Tree #

tree growth simulation: start with seed and run for n generations

exact results

tree :: Int -> Tree -> Dist Tree #

tree n : tree distribution after n generations

hist :: Int -> Expand Tree #

hist n : history of tree distributions for n generations

simulation results

simTree :: Int -> Int -> RTrans Tree #

Since '(*.)' is overloaded for Trans and RChange, we can run the simulation ~. directly to n *. live.

sh2 :: IO () #

st2 :: IO () #

p1 :: Vis #

p2 :: Vis #

p3 :: Vis #

p4 :: Vis #

p5 :: Vis #

p6 :: Vis #

done :: Tree -> Bool #