Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
Base class of the StatHandler class, implements the Handler interface. More...
#include <stathandler.h>
Public Member Functions | |
StatHandlerBase () | |
virtual | ~StatHandlerBase () |
virtual void | reset () |
Empties the _stats list and calls clear() (defined in the derived class). More... | |
Accessors | |
Metapop * | get_pop_ptr () |
void | set_service (StatServices *srv) |
StatServices * | get_service () |
unsigned int | getOccurrence () |
unsigned int | getNumOccurrences () |
unsigned int | getCurrentOccurrence () |
unsigned int | getNbRecorders () |
std::list< StatRecBase * > & | getStats () |
virtual void | add (StatRecBase *rec) |
Handler implementation | |
virtual void | init () |
virtual void | update () |
This function is left empty as the StatServices calls StatRecorder::setVal directly. More... | |
StatHandler interface declaration | |
virtual bool | setStatRecorders (std::string &token)=0 |
virtual void | clear ()=0 |
![]() | |
virtual void | init ()=0 |
Inits state. More... | |
virtual void | update ()=0 |
Updates the handler state. More... | |
virtual | ~Handler () |
Protected Attributes | |
Metapop * | _pop |
Link to the current population, set through the link to the StatService. More... | |
Private Types | |
typedef std::list< StatRecBase * >::iterator | STAT_IT |
Private Attributes | |
std::list< StatRecBase * > | _stats |
Link to the StatRecorder list elements in the StatHandler derived class. More... | |
StatServices * | _service |
Link to the StatService. More... | |
Base class of the StatHandler class, implements the Handler interface.
This class stores the Handler state and the list of links to the StatRecBase. This list is duplicated in the StatHandler as a list of the StatRecorder templates. It allows the StatService to access the stat recorders without knowledge of the actual StatHandler and StatRecorder template type.
|
private |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
References _stats.
Referenced by StatHandler< SH >::add().
|
pure virtual |
Implemented in StatHandler< SH >, StatHandler< LCE_SelectionSH >, StatHandler< MPStatHandler >, StatHandler< TTBDMI_SH >, StatHandler< TTDeletMutBitstrSH >, StatHandler< TTDispersalSH >, StatHandler< TTNeutralGenesSH >, StatHandler< TTQuantiSH >, and StatHandler< TTWolbachiaSH >.
Referenced by reset().
|
inline |
References _service, and StatServices::get_pop_ptr().
Referenced by init().
|
inline |
|
inline |
References _service, and StatServices::getCurrentOccurrence().
|
inline |
|
inline |
References _service, and StatServices::getNumOccurrences().
|
inline |
References _service, and StatServices::getOccurrence().
|
inline |
|
virtual |
Implements Handler.
Reimplemented in TTDispersalSH, TTNeutralGenesSH, and TTQuantiSH.
References _pop, fatal(), get_pop_ptr(), SIMenv::getGenerations(), and SIMenv::getReplicates().
Referenced by TTDispersalSH::init(), and TTQuantiSH::init().
|
virtual |
|
inline |
References _service.
Referenced by StatServices::attach().
|
pure virtual |
Implemented in MPStatHandler, TTBDMI_SH, TTDeletMutBitstrSH, TTDispersalSH, TTNeutralGenesSH, TTQuantiSH, LCE_SelectionSH, and TTWolbachiaSH.
|
inlinevirtual |
This function is left empty as the StatServices calls StatRecorder::setVal directly.
Implements Handler.
|
protected |
Link to the current population, set through the link to the StatService.
Referenced by TTQuantiSH::addAvgPerPatch(), TTQuantiSH::addCovarPerPatch(), TTDispersalSH::addDispPerPatch(), TTQuantiSH::addEigenPerPatch(), TTQuantiSH::addEigenValuesPerPatch(), TTQuantiSH::addEigenVect1PerPatch(), MPStatHandler::addIndNumPerPatch(), LCE_SelectionSH::addMeanPerPatch(), MPStatHandler::addPatchAge(), TTQuantiSH::addQuanti(), TTQuantiSH::addSkewPerPatch(), TTBDMI_SH::addStats(), LCE_SelectionSH::addVarPerPatch(), TTQuantiSH::addVarPerPatch(), TTNeutralGenesSH::allocateTables(), MPStatHandler::getAdultSexRatio(), TTNeutralGenesSH::getDxy(), TTNeutralGenesSH::getDxyPerPatch(), MPStatHandler::getEmigrantInPatch(), MPStatHandler::getFemNumber(), MPStatHandler::getImigrateInPatch(), MPStatHandler::getKolonisersInPatch(), TTDeletMutBitstrSH::getLoad(), MPStatHandler::getMalNumber(), MPStatHandler::getMeanAssignedFecundity(), TTDispersalSH::getMeanDispRate(), TTDispersalSH::getMeanDispRateInPatch(), MPStatHandler::getMeanEmigrantPerPatch(), TTDeletMutBitstrSH::getMeanFecWithPatchMate(), TTWolbachiaSH::getMeanFemaleInfection_perPatch(), TTDispersalSH::getMeanFemDispRate(), MPStatHandler::getMeanImigrantPerPatch(), MPStatHandler::getMeanKolonisersPerPatch(), MPStatHandler::getMeanKolonisersProportion(), TTDispersalSH::getMeanMalDispRate(), TTWolbachiaSH::getMeanMaleInfection_perPatch(), MPStatHandler::getMeanMatings(), TTWolbachiaSH::getMeanOffsprgFemaleInfection_perPatch(), TTWolbachiaSH::getMeanOffsprgInfection(), TTWolbachiaSH::getMeanOffsprgMaleInfection_perPatch(), MPStatHandler::getMeanPatchAge(), MPStatHandler::getMeanPatchDensity(), MPStatHandler::getMeanPatchDensityVariance(), LCE_SelectionSH::getMeanPatchFitness(), MPStatHandler::getMeanPatchSize(), MPStatHandler::getMeanPatchSizePerSex(), MPStatHandler::getMeanResidantPerPatch(), MPStatHandler::getOffFemNumber(), MPStatHandler::getOffMalNumber(), TTDispersalSH::getOffsprgMeanDispRate(), MPStatHandler::getOffsprgSexRatio(), MPStatHandler::getPatchAge(), TTDeletMutBitstrSH::getPatchLoad(), MPStatHandler::getPatchSize(), MPStatHandler::getPopulationSize(), MPStatHandler::getResidantInPatch(), LCE_SelectionSH::getVarPatchFitness(), init(), TTDispersalSH::init(), TTQuantiSH::init(), TTNeutralGenesSH::setAdults_Theta(), TTNeutralGenesSH::setAlleleTables(), TTNeutralGenesSH::setCoaMatrix(), TTNeutralGenesSH::setCoaMatrixRecorders(), LCE_SelectionSH::setDataTable(), TTQuantiSH::setDataTables(), TTDeletMutBitstrSH::setDeletStats(), TTNeutralGenesSH::setDxyRecorders(), TTDeletMutBitstrSH::setFst(), TTNeutralGenesSH::setFst_li(), TTNeutralGenesSH::setFstat(), TTNeutralGenesSH::setFstat2(), TTNeutralGenesSH::setFstatWeirCockerham(), TTNeutralGenesSH::setFstatWeirCockerham_MS(), TTNeutralGenesSH::setFstMatrix(), TTNeutralGenesSH::setFstMatrixRecorders(), TTNeutralGenesSH::setHeteroTable(), TTNeutralGenesSH::setHeterozygosity(), TTNeutralGenesSH::setHo(), TTNeutralGenesSH::setHo2(), TTNeutralGenesSH::setHs(), TTNeutralGenesSH::setHs2(), TTWolbachiaSH::setInfectionStats(), MPStatHandler::setKinship(), TTDeletMutBitstrSH::setLethalEquivalents(), TTNeutralGenesSH::setLociDivCounter(), TTDeletMutBitstrSH::setMeanViability(), TTNeutralGenesSH::setNeiGeneticDistance(), TTNeutralGenesSH::setNeiGeneticDistanceRecorders(), MPStatHandler::setObsrvdExtinctionRate(), MPStatHandler::setPedegreeCount(), MPStatHandler::setReproductiveStats(), TTNeutralGenesSH::setSibStats(), TTWolbachiaSH::setStatRecorders(), TTBDMI_SH::setStats(), TTQuantiSH::setStats(), MPStatHandler::setStatsForMigrantsPerPatch(), and TTDeletMutBitstrSH::setViability().
|
private |
Link to the StatService.
Referenced by get_pop_ptr(), get_service(), getCurrentOccurrence(), getNumOccurrences(), getOccurrence(), and set_service().
|
private |
Link to the StatRecorder list elements in the StatHandler derived class.
Referenced by add(), getNbRecorders(), getStats(), and reset().