1 #ifndef POPULATIONSTATESIMPLEADVANCEDCOMMON_H
3 #define POPULATIONSTATESIMPLEADVANCEDCOMMON_H
14 PopulationStateSimpleAdvancedCommon();
15 ~PopulationStateSimpleAdvancedCommon();
17 PersonBase **
getAllPeople() {
if ((
int)m_people.size() <= m_numGlobalDummies)
return 0;
return &(m_people[m_numGlobalDummies]); }
22 int getNumberOfPeople()
const {
int num = (int)m_people.size() - m_numGlobalDummies; assert(num >= 0);
return num; }
31 virtual int64_t getNextPersonID() = 0;
32 virtual void addAlgorithmInfo(
PersonBase *pPerson) = 0;
33 virtual void setListIndex(
PersonBase *pPerson,
int idx) = 0;
34 virtual int getListIndex(
PersonBase *pPerson) = 0;
37 std::vector<PersonBase *> m_people;
38 int m_numMen, m_numWomen;
39 const int m_numGlobalDummies;
42 std::vector<PersonBase *> m_deceasedPersons;
43 mutable std::vector<PersonBase *> m_otherAffectedPeople;
46 #endif // POPULATIONSTATESIMPLEADVANCEDCOMMON_H
virtual void setPersonDied(PersonBase *pPerson)=0
When a person has died, this function must be called to inform the simulation about this...
virtual PersonBase ** getWomen()=0
Same as PopulationStateInterface::getAllPeople, but only the women are returned.
virtual PersonBase ** getAllPeople()=0
Returns a list to the current living members in the population, introduced into the simulation using ...
virtual void markAffectedPerson(PersonBase *pPerson) const =0
This should only be called from within the PopulationEvent::markOtherAffectedPeople function...
virtual PersonBase ** getDeceasedPeople()=0
Returns the people who were part of the simulation but who are now deceased (intended for result anal...
virtual void addNewPerson(PersonBase *pPerson)=0
When a new person is introduced into the population, this function must be used to tell the simulatio...
virtual int getNumberOfMen() const =0
Returns the number of people in the array returned by PopulationStateInterface::getMen.
virtual int getNumberOfDeceasedPeople() const =0
Returns the number of people in the array returned by PopulationStateInterface::getDeceasedPeople.
virtual int getNumberOfPeople() const =0
Returns the number of people in the array returned by PopulationStateInterface::getAllPeople.
This is the base class for a person in a population-based simulation.
Definition: personbase.h:23
virtual int getNumberOfWomen() const =0
Returns the number of people in the array returned by PopulationStateInterface::getWomen.
virtual PersonBase ** getMen()=0
Same as PopulationStateInterface::getAllPeople, but only the men are returned.
Interface for a simulation state for the population-based algorithm, specifying member functions that...
Definition: populationinterfaces.h:26