| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Epidemic.Types.Population
Synopsis
- newtype Person = Person Identifier
- newtype People = People (Vector Person)
- class Population a where
- susceptiblePeople :: a -> Maybe People
- infectiousPeople :: a -> Maybe People
- removedPeople :: a -> Maybe People
- isInfected :: a -> Bool
- newtype Identifier = Identifier Integer
- asPeople :: [Person] -> People
- includesPerson :: People -> Person -> Bool
- haveCommonPeople :: People -> People -> Bool
- nullPeople :: People -> Bool
- numPeople :: People -> Int
- addPerson :: Person -> People -> People
- removePerson :: Person -> People -> People
- personByteString :: Person -> Builder
Documentation
A type to represent a single person in a group of People
Constructors
| Person Identifier |
Instances
| Eq Person Source # | |
| Show Person Source # | |
| Generic Person Source # | |
| ToJSON Person Source # | |
Defined in Epidemic.Types.Population | |
| FromJSON Person Source # | |
| type Rep Person Source # | |
Defined in Epidemic.Types.Population type Rep Person = D1 ('MetaData "Person" "Epidemic.Types.Population" "epi-sim-0.4.2-4l1mCHWa7vKLa54bgYWgDR" 'True) (C1 ('MetaCons "Person" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Identifier))) | |
A type to represent a population.
class Population a where Source #
Class of types that can represent populations in an epidemic simulation.
Methods
susceptiblePeople :: a -> Maybe People Source #
infectiousPeople :: a -> Maybe People Source #
removedPeople :: a -> Maybe People Source #
isInfected :: a -> Bool Source #
Instances
| Population LogisticBDSDPopulation Source # | |
Defined in Epidemic.Model.LogisticBDSD | |
| Population InhomBDSPop Source # | |
Defined in Epidemic.Model.InhomogeneousBDS Methods susceptiblePeople :: InhomBDSPop -> Maybe People Source # infectiousPeople :: InhomBDSPop -> Maybe People Source # removedPeople :: InhomBDSPop -> Maybe People Source # isInfected :: InhomBDSPop -> Bool Source # | |
| Population BDSCODPopulation Source # | |
Defined in Epidemic.Model.BDSCOD Methods susceptiblePeople :: BDSCODPopulation -> Maybe People Source # infectiousPeople :: BDSCODPopulation -> Maybe People Source # removedPeople :: BDSCODPopulation -> Maybe People Source # isInfected :: BDSCODPopulation -> Bool Source # | |
newtype Identifier Source #
A type to hold an integer which is unique to each Person.
Constructors
| Identifier Integer |
Instances
| Eq Identifier Source # | |
Defined in Epidemic.Types.Population | |
| Show Identifier Source # | |
Defined in Epidemic.Types.Population Methods showsPrec :: Int -> Identifier -> ShowS # show :: Identifier -> String # showList :: [Identifier] -> ShowS # | |
| Generic Identifier Source # | |
Defined in Epidemic.Types.Population Associated Types type Rep Identifier :: Type -> Type # | |
| ToJSON Identifier Source # | |
Defined in Epidemic.Types.Population Methods toJSON :: Identifier -> Value # toEncoding :: Identifier -> Encoding # toJSONList :: [Identifier] -> Value # toEncodingList :: [Identifier] -> Encoding # | |
| FromJSON Identifier Source # | |
Defined in Epidemic.Types.Population | |
| type Rep Identifier Source # | |
Defined in Epidemic.Types.Population type Rep Identifier = D1 ('MetaData "Identifier" "Epidemic.Types.Population" "epi-sim-0.4.2-4l1mCHWa7vKLa54bgYWgDR" 'True) (C1 ('MetaCons "Identifier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer))) | |
includesPerson :: People -> Person -> Bool Source #
Predicate for whether a person is one of the people
haveCommonPeople :: People -> People -> Bool Source #
Predicate for whether two sets of people have any members in common.
nullPeople :: People -> Bool Source #
Predicate for whether there are any people
personByteString :: Person -> Builder Source #
A bytestring builder for a person