1 #ifndef POPULATIONINTERFACES_H
3 #define POPULATIONINTERFACES_H
121 virtual bool_t run(
double &tMax, int64_t &maxEvents,
double startTime = 0) = 0;
This class allows you to generate random numbers, and uses the GNU Scientific Library for this.
Definition: gslrandomnumbergenerator.h:17
Base class to be able to store algorithm-specific information in the PersonBase object for a person i...
Definition: populationinterfaces.h:145
This is the base class for a person in a population-based simulation.
Definition: personbase.h:24
An interface to allow a member function PopulationAlgorithmAboutToFireInterface::onAboutToFire to be ...
Definition: populationinterfaces.h:90
virtual void onAboutToFire(PopulationEvent *pEvt)=0
If set using PopulationAlgorithmInterface::setAboutToFireAction, this function will be called right b...
An interface for a population based mNRM algorithm.
Definition: populationinterfaces.h:102
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 void onNewEvent(PopulationEvent *pEvt)=0
When a new event has been created, it must be injected into the simulation using this function.
virtual double getTime() const =0
Must return the simulation tilme of the algorithm.
virtual GslRandomNumberGenerator * getRandomNumberGenerator() const =0
Must return the random number generator used by the algorithm.
virtual void setAboutToFireAction(PopulationAlgorithmAboutToFireInterface *pAction)=0
Allows you to set the action that needs to be performed before firing an event dynamically.
virtual bool_t init()=0
Abstract function to initialize the implementation used.
This is the base class for events in population-based simulations.
Definition: populationevent.h:64
Interface for a simulation state for the population-based algorithm, specifying member functions that...
Definition: populationinterfaces.h:27
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.
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 PersonBase ** getAllPeople()=0
Returns a list to the current living members in the population, introduced into the simulation using ...
void setExtraStateInfo(PopulationStateExtra *pExtra)
This allows you to store additional information for a state that implements this PopulationStateInter...
Definition: populationinterfaces.h:78
virtual void setPersonDied(PersonBase *pPerson)=0
When a person has died, this function must be called to inform the simulation about this.
virtual PersonBase ** getMen()=0
Same as PopulationStateInterface::getAllPeople, but only the men are returned.
virtual void markAffectedPerson(PersonBase *pPerson) const =0
This should only be called from within the PopulationEvent::markOtherAffectedPeople function,...
virtual PersonBase ** getWomen()=0
Same as PopulationStateInterface::getAllPeople, but only the women are returned.
virtual int getNumberOfWomen() const =0
Returns the number of people in the array returned by PopulationStateInterface::getWomen.
PopulationStateExtra * getExtraStateInfo() const
Retrieves the PopulationStateExtra instance that was stored using PopulationStateInterface::setExtraS...
Definition: populationinterfaces.h:82
virtual PersonBase ** getDeceasedPeople()=0
Returns the people who were part of the simulation but who are now deceased (intended for result anal...
virtual int getNumberOfMen() const =0
Returns the number of people in the array returned by PopulationStateInterface::getMen.
This is a base class describing the simulation state of an mNRM algorithm.
Definition: algorithm.h:24
Type to return true/false with error description.
Definition: booltype.h:26