| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Epidemic.Types.Events
Synopsis
- data EpidemicEvent
- popSampPeople :: EpidemicEvent -> People
- popSampSeq :: EpidemicEvent -> Bool
- popSampTime :: EpidemicEvent -> AbsoluteTime
- indSampPerson :: EpidemicEvent -> Person
- indSampSeq :: EpidemicEvent -> Bool
- indSampTime :: EpidemicEvent -> AbsoluteTime
- data EpidemicTree
- maybeEpidemicTree :: [EpidemicEvent] -> Either String EpidemicTree
- isExtinctionOrStopping :: EpidemicEvent -> Bool
- isIndividualSample :: EpidemicEvent -> Bool
- derivedFrom :: Person -> [EpidemicEvent] -> [EpidemicEvent]
Documentation
data EpidemicEvent Source #
Events that can occur in an epidemic with their absolute time.
Constructors
| Infection AbsoluteTime Person Person | absolute time; infector; infectee |
| Removal AbsoluteTime Person | |
| IndividualSample AbsoluteTime Person Bool | |
| PopulationSample AbsoluteTime People Bool | |
| Extinction AbsoluteTime | epidemic went extinct |
| StoppingTime AbsoluteTime | the simulation reached the stopping time |
Instances
popSampPeople :: EpidemicEvent -> People Source #
popSampSeq :: EpidemicEvent -> Bool Source #
indSampPerson :: EpidemicEvent -> Person Source #
indSampSeq :: EpidemicEvent -> Bool Source #
data EpidemicTree Source #
The whole transmission tree including the unobserved leaves. Lineages that
are still extant are modelled as shoots and contain a Person as their
data rather than an event.
Constructors
| Branch EpidemicEvent EpidemicTree EpidemicTree | |
| Leaf EpidemicEvent | |
| Shoot Person |
Instances
| Eq EpidemicTree Source # | |
Defined in Epidemic.Types.Events | |
| Show EpidemicTree Source # | |
Defined in Epidemic.Types.Events Methods showsPrec :: Int -> EpidemicTree -> ShowS # show :: EpidemicTree -> String # showList :: [EpidemicTree] -> ShowS # | |
Arguments
| :: [EpidemicEvent] | ordered epidemic events |
| -> Either String EpidemicTree |
If possible return an EpidemicTree describing the sorted list of
EpidemicEvent.
isExtinctionOrStopping :: EpidemicEvent -> Bool Source #
Predicate for whether an EpidemicEvent is one of the terminal events of
extinction or the stopping time having been reached.
isIndividualSample :: EpidemicEvent -> Bool Source #
Predicate for the event being an individual sample event.
Arguments
| :: Person | |
| -> [EpidemicEvent] | ordered epidemic events |
| -> [EpidemicEvent] |
The events that occurred as a result of the existance of the given person.