probability-0.2.2.1: Probabilistic Functional ProgrammingSource codeContentsIndex
Numeric.Probability.Example.TreeGrowth
Contents
exact results
simulation results
Synopsis
type Height = Int
data Tree
= Alive Height
| Hit Height
| Fallen
grow :: Trans Tree
hit :: Trans Tree
fall :: Trans Tree
evolve :: Trans Tree
seed :: Tree
tree :: Int -> Tree -> Dist Tree
hist :: Int -> Expand Tree
simTree :: Int -> Int -> RTrans Tree
simHist :: Int -> Int -> RExpand Tree
t2 :: Dist Tree
h2 :: Space Tree
st2 :: IO ()
sh2 :: IO ()
height :: Tree -> Int
p2 :: Vis
p3 :: Vis
p4 :: Vis
p5 :: Vis
p6 :: Vis
p1 :: Vis
heightAtTime :: Int -> Plot
heightCurve :: (Int, Color) -> Plot
done :: Tree -> Bool
ev5 :: Tree -> Dist Tree
Documentation
type Height = IntSource
data Tree Source
Constructors
Alive Height
Hit Height
Fallen
show/hide Instances
grow :: Trans TreeSource
hit :: Trans TreeSource
fall :: Trans TreeSource
evolve :: Trans TreeSource
seed :: TreeSource
tree growth simulation: start with seed and run for n generations
exact results
tree :: Int -> Tree -> Dist TreeSource
tree n : tree distribution after n generations
hist :: Int -> Expand TreeSource
hist n : history of tree distributions for n generations
simulation results
simTree :: Int -> Int -> RTrans TreeSource
Since '(*.)' is overloaded for Trans and RChange, we can run the simulation ~. directly to n *. live.
simHist :: Int -> Int -> RExpand TreeSource
t2 :: Dist TreeSource
h2 :: Space TreeSource
st2 :: IO ()Source
sh2 :: IO ()Source
height :: Tree -> IntSource
p2 :: VisSource
p3 :: VisSource
p4 :: VisSource
p5 :: VisSource
p6 :: VisSource
p1 :: VisSource
heightAtTime :: Int -> PlotSource
heightCurve :: (Int, Color) -> PlotSource
done :: Tree -> BoolSource
ev5 :: Tree -> Dist TreeSource
Produced by Haddock version 2.4.2