1 #ifndef POPULATIONINTERFACES_H
3 #define POPULATIONINTERFACES_H
121 virtual bool_t run(
double &tMax, int64_t &maxEvents,
double startTime = 0) = 0;
136 virtual double getTime()
const = 0;
151 #endif // POPULATIONINTERFACES_H
virtual void setPersonDied(PersonBase *pPerson)=0
When a person has died, this function must be called to inform the simulation about this...
Base class to be able to store algorithm-specific information in the PersonBase object for a person i...
Definition: populationinterfaces.h:144
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 ...
Type to return true/false with error description.
Definition: booltype.h:25
virtual void onAboutToFire(PopulationEvent *pEvt)=0
If set using PopulationAlgorithmInterface::setAboutToFireAction, this function will be called right b...
This is a base class describing the simulation state of an mNRM algorithm.
Definition: algorithm.h:23
virtual void setAboutToFireAction(PopulationAlgorithmAboutToFireInterface *pAction)=0
Allows you to set the action that needs to be performed before firing an event dynamically.
virtual void markAffectedPerson(PersonBase *pPerson) const =0
This should only be called from within the PopulationEvent::markOtherAffectedPeople function...
virtual GslRandomNumberGenerator * getRandomNumberGenerator() const =0
Must return the random number generator used by the algorithm.
virtual bool_t init()=0
Abstract function to initialize the implementation used.
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...
void setExtraStateInfo(PopulationStateExtra *pExtra)
This allows you to store additional information for a state that implements this PopulationStateInter...
Definition: populationinterfaces.h:78
virtual int getNumberOfMen() const =0
Returns the number of people in the array returned by PopulationStateInterface::getMen.
PopulationStateExtra * getExtraStateInfo() const
Retrieves the PopulationStateExtra instance that was stored using PopulationStateInterface::setExtraS...
Definition: populationinterfaces.h:82
virtual int getNumberOfDeceasedPeople() const =0
Returns the number of people in the array returned by PopulationStateInterface::getDeceasedPeople.
This class allows you to generate random numbers, and uses the GNU Scientific Library for this...
Definition: gslrandomnumbergenerator.h:16
virtual int getNumberOfPeople() const =0
Returns the number of people in the array returned by PopulationStateInterface::getAllPeople.
This is the base class for events in population-based simulations.
Definition: populationevent.h:63
An interface to allow a member function PopulationAlgorithmAboutToFireInterface::onAboutToFire to be ...
Definition: populationinterfaces.h:89
This is the base class for a person in a population-based simulation.
Definition: personbase.h:23
virtual double getTime() const =0
Must return the simulation tilme of the algorithm.
virtual int getNumberOfWomen() const =0
Returns the number of people in the array returned by PopulationStateInterface::getWomen.
An interface for a population based mNRM algorithm.
Definition: populationinterfaces.h:101
virtual void onNewEvent(PopulationEvent *pEvt)=0
When a new event has been created, it must be injected into the simulation using this function...
virtual bool_t run(double &tMax, int64_t &maxEvents, double startTime=0)=0
This should be called to actually start the simulation, do not call Algorithm::evolve for this...
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