epi-sim-0.4.2: A library for simulating epidemics as birth-death processes.
Safe HaskellNone
LanguageHaskell2010

Epidemic.Types.Population

Synopsis

Documentation

newtype Person Source #

A type to represent a single person in a group of People

Constructors

Person Identifier 

Instances

Instances details
Eq Person Source # 
Instance details

Defined in Epidemic.Types.Population

Methods

(==) :: Person -> Person -> Bool #

(/=) :: Person -> Person -> Bool #

Show Person Source # 
Instance details

Defined in Epidemic.Types.Population

Generic Person Source # 
Instance details

Defined in Epidemic.Types.Population

Associated Types

type Rep Person :: Type -> Type #

Methods

from :: Person -> Rep Person x #

to :: Rep Person x -> Person #

ToJSON Person Source # 
Instance details

Defined in Epidemic.Types.Population

FromJSON Person Source # 
Instance details

Defined in Epidemic.Types.Population

type Rep Person Source # 
Instance details

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)))

newtype People Source #

A type to represent a population.

Constructors

People (Vector Person) 

Instances

Instances details
Eq People Source # 
Instance details

Defined in Epidemic.Types.Population

Methods

(==) :: People -> People -> Bool #

(/=) :: People -> People -> Bool #

Show People Source # 
Instance details

Defined in Epidemic.Types.Population

Generic People Source # 
Instance details

Defined in Epidemic.Types.Population

Associated Types

type Rep People :: Type -> Type #

Methods

from :: People -> Rep People x #

to :: Rep People x -> People #

ToJSON People Source # 
Instance details

Defined in Epidemic.Types.Population

FromJSON People Source # 
Instance details

Defined in Epidemic.Types.Population

type Rep People Source # 
Instance details

Defined in Epidemic.Types.Population

type Rep People = D1 ('MetaData "People" "Epidemic.Types.Population" "epi-sim-0.4.2-4l1mCHWa7vKLa54bgYWgDR" 'True) (C1 ('MetaCons "People" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vector Person))))

newtype Identifier Source #

A type to hold an integer which is unique to each Person.

Constructors

Identifier Integer 

Instances

Instances details
Eq Identifier Source # 
Instance details

Defined in Epidemic.Types.Population

Show Identifier Source # 
Instance details

Defined in Epidemic.Types.Population

Generic Identifier Source # 
Instance details

Defined in Epidemic.Types.Population

Associated Types

type Rep Identifier :: Type -> Type #

ToJSON Identifier Source # 
Instance details

Defined in Epidemic.Types.Population

FromJSON Identifier Source # 
Instance details

Defined in Epidemic.Types.Population

type Rep Identifier Source # 
Instance details

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)))

asPeople :: [Person] -> People Source #

A list of persons as a people

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

numPeople :: People -> Int Source #

The number of people

addPerson :: Person -> People -> People Source #

Add a person to a group of people

removePerson :: Person -> People -> People Source #

Remove a person from a group of people

personByteString :: Person -> Builder Source #

A bytestring builder for a person