Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- eventPopDelta :: EpidemicEvent -> Integer
- firstScheduled :: Time -> Timed Probability -> Maybe (Time, Probability)
- noScheduledEvent :: Time -> Time -> Timed Probability -> Bool
- personsInEvent :: EpidemicEvent -> [Person]
- peopleInEvents :: [EpidemicEvent] -> People
- infected :: Person -> Person -> EpidemicEvent -> Bool
- infectedBy :: Person -> [EpidemicEvent] -> People
- hasDescendentWhich :: [EpidemicEvent] -> (Person -> Bool) -> Person -> Bool
- hasSampledDescendent :: [EpidemicEvent] -> Person -> Bool
- wasSampled :: [EpidemicEvent] -> Person -> Bool
- samplingEvent :: [EpidemicEvent] -> Person -> EpidemicEvent
- class ModelParameters a where
- class Population a where
- susceptiblePeople :: a -> Maybe People
- infectiousPeople :: a -> Maybe People
- removedPeople :: a -> Maybe People
- isInfected :: a -> Bool
- data TransmissionTree
- transmissionTree :: [EpidemicEvent] -> Person -> TransmissionTree
- hasSampledLeaf :: TransmissionTree -> Bool
- data SampleTree
- sampleTree :: TransmissionTree -> SampleTree
- sampleTreeEvents' :: SampleTree -> [EpidemicEvent]
- sampleTreeEvents :: SampleTree -> [EpidemicEvent]
Documentation
eventPopDelta :: EpidemicEvent -> Integer Source #
The number of people added or removed in an event.
:: Time | The given time |
-> Timed Probability | The information about all scheduled events |
-> Maybe (Time, Probability) |
The first scheduled event after a given time.
:: 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.
personsInEvent :: EpidemicEvent -> [Person] Source #
peopleInEvents :: [EpidemicEvent] -> People Source #
:: Person | Potential infector |
-> Person | Potential infectee |
-> EpidemicEvent | Given event |
-> Bool |
Predicate for whether the first person infected the second in the given event
:: 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
hasSampledDescendent :: [EpidemicEvent] -> Person -> Bool Source #
:: [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.
class ModelParameters a where Source #
class Population a where Source #
susceptiblePeople :: a -> Maybe People Source #
infectiousPeople :: a -> Maybe People Source #
removedPeople :: a -> Maybe People Source #
isInfected :: a -> Bool Source #
data TransmissionTree Source #
TTUnresolved Person | |
TTDeath People EpidemicEvent | |
TTBirth Person EpidemicEvent (TransmissionTree, TransmissionTree) |
Instances
Show TransmissionTree Source # | |
Defined in Epidemic showsPrec :: Int -> TransmissionTree -> ShowS # show :: TransmissionTree -> String # showList :: [TransmissionTree] -> ShowS # |
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
data SampleTree Source #
Instances
Show SampleTree Source # | |
Defined in Epidemic showsPrec :: Int -> SampleTree -> ShowS # show :: SampleTree -> String # showList :: [SampleTree] -> ShowS # |
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.