Changelog for epi-sim-0.7.0

Changelog for epi-sim

0.7.0

0.6.0

0.5.2

0.5.1

0.5.0

0.4.2

0.4.1

0.4.0.0

-- | Events that can occur in an epidemic with their absolute time.
data EpidemicEvent
  = Infection AbsoluteTime Person Person -- ^ infection time, infector, infectee
  | Removal AbsoluteTime Person -- ^ removal without observation
  | Sampling AbsoluteTime Person -- ^ removal and inclusion in phylogeny
  | Catastrophe AbsoluteTime People -- ^ scheduled sampling of lineages
  | Occurrence AbsoluteTime Person -- ^ removal and observed by not in phylogeny
  | Disaster AbsoluteTime People -- ^ scheduled occurrence of lineages
  | Extinction -- ^ epidemic went extinct time time can be recovered from the preceeding removal
  | StoppingTime -- ^ the simulation reached the stopping time
  deriving (Show, Generic, Eq)

becomes

-- | Events that can occur in an epidemic with their absolute time.
data EpidemicEvent
  = Infection AbsoluteTime Infector Infectee
  | Removal AbsoluteTime Person
  | IndividualSample
      { indSampTime :: AbsoluteTime
      , indSampPerson :: Person
      , indSampSeq :: Bool
      }
  | PopulationSample
      { popSampTime :: AbsoluteTime
      , popSampPeople :: People
      , popSampSeq :: Bool
      }
  | Extinction -- ^ epidemic went extinct time time can be recovered from the preceeding removal
  | StoppingTime -- ^ the simulation reached the stopping time
  deriving (Show, Generic, Eq)
instance Csv.ToRecord EpidemicEvent where
  toRecord e =
    case e of
      (Infection time person1 person2) ->
        Csv.record
          [ "infection"
          , Csv.toField time
          , Csv.toField person1
          , Csv.toField person2
          ]
      (Removal time person) ->
        Csv.record ["removal", Csv.toField time, Csv.toField person, "NA"]
      (Sampling time person) ->
        Csv.record ["sampling", Csv.toField time, Csv.toField person, "NA"]
      (Catastrophe time people) ->
        Csv.record ["catastrophe", Csv.toField time, Csv.toField people, "NA"]
      (Occurrence time person) ->
        Csv.record ["occurrence", Csv.toField time, Csv.toField person, "NA"]
      (Disaster time people) ->
        Csv.record ["disaster", Csv.toField time, Csv.toField people, "NA"]
      Extinction -> Csv.record ["extinction", "NA", "NA", "NA"]
      StoppingTime -> Csv.record ["stop", "NA", "NA", "NA"]

0.3.0.0

0.2.2.0

0.2.1.0

0.2.0.1

0.2.0.0

0.1.9.0

0.1.8.8

0.1.8.7

0.1.8.6

0.1.8.5

0.1.8.4

0.1.8.3

0.1.8.2

0.1.8.1

0.1.8.0

0.1.7.2

0.1.7.1

0.1.7.0

0.1.6.2

0.1.6.1

0.1.6.0

0.1.5.1

0.1.5.0

0.1.4.0

0.1.3.0

0.1.2.0

0.1.1.0

0.1.0.0