epi-sim-0.2.2.0: A library for simulating epidemics as birth-death processes.

Safe HaskellNone
LanguageHaskell2010

Epidemic

Synopsis

Documentation

eventPopDelta :: EpidemicEvent -> Integer Source #

The number of people added or removed in an event.

firstScheduled Source #

Arguments

:: Time

The given time

-> Timed Probability

The information about all scheduled events

-> Maybe (Time, Probability) 

The first scheduled event after a given time.

noScheduledEvent Source #

Arguments

:: Time

Start time for interval

-> Time

End time for interval

-> Timed Probability

Information about all scheduled events

-> Bool 

Predicate for whether there is a scheduled event during an interval.

infected Source #

Arguments

:: Person

Potential infector

-> Person

Potential infectee

-> EpidemicEvent

Given event

-> Bool 

Predicate for whether the first person infected the second in the given event

infectedBy Source #

Arguments

:: Person

Potential infector

-> [EpidemicEvent]

Events

-> People 

The people infected by a particular person in a list of events.

hasDescendentWhich :: [EpidemicEvent] -> (Person -> Bool) -> Person -> Bool Source #

Predicate for whether a person or one of their descendents satisfies a predicate

wasSampled Source #

Arguments

:: [EpidemicEvent]

The given events

-> Person

The person of interest

-> Bool 

Predicate for whether a person was sampled in the given events

samplingEvent :: [EpidemicEvent] -> Person -> EpidemicEvent Source #

Return the sampling event of a person who was sampled.

transmissionTree :: [EpidemicEvent] -> Person -> TransmissionTree Source #

A transmission tree of all the events starting from a given person

hasSampledLeaf :: TransmissionTree -> Bool Source #

A predicate for whether there is a sampled leaf in the transmission tree

sampleTree :: TransmissionTree -> SampleTree Source #

A transmission tree with all non-sampling leaves removed

sampleTreeEvents' :: SampleTree -> [EpidemicEvent] Source #

Recurse through the tree and extract all birth and death events.

sampleTreeEvents :: SampleTree -> [EpidemicEvent] Source #

The unique events in a sample tree.