Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
A StatHandler for the Metapop SimComponent. More...
#include <MPStatHandler.h>
Public Member Functions | |
MPStatHandler () | |
virtual | ~MPStatHandler () |
virtual bool | setStatRecorders (std::string &token) |
void | setStatsForDemography (age_t AGE) |
void | setStatsForPop () |
void | setStatsForPopPerPatch () |
void | setStatsForMigrants () |
void | setStatsForMigrantsPerPatch () |
void | addIndNumPerPatch (sex_t SEX, age_t AGE) |
void | addPatchAge () |
Migration | |
double | getMeanEmigrantPerPatch () |
double | getMeanImigrantPerPatch () |
double | getMeanMigrantRatio () |
double | getMeanResidantPerPatch () |
double | getMeanKolonisersProportion () |
double | getMeanKolonisersPerPatch () |
double | getEmigrantInPatch (unsigned int i) |
double | getResidantInPatch (unsigned int i) |
double | getImigrateInPatch (unsigned int i) |
double | getKolonisersInPatch (unsigned int i) |
Patch extinction | |
void | setObsrvdExtinctionRate () |
double | getObsrvdExtinctionRate () |
double | get_isAlive () |
double | getPatchAge (unsigned int i) |
double | getMeanPatchAge () |
Demography | |
double | getAdultSexRatio () |
double | getOffsprgSexRatio () |
double | getPatchSize (unsigned int age, unsigned int patch) |
double | getPopulationSize (unsigned int age) |
double | getMeanPatchSize (unsigned int age) |
double | getMeanPatchSizePerSex (unsigned int sex, unsigned int age) |
double | getMeanPatchDensity (age_t AGE) |
double | getMeanPatchDensityVariance (age_t AGE) |
double | getFemNumber (unsigned int i) |
double | getMalNumber (unsigned int i) |
double | getOffFemNumber (unsigned int i) |
double | getOffMalNumber (unsigned int i) |
double | getMeanAssignedFecundity (unsigned int sex) |
double | getMeanMatings (unsigned int sex) |
double | setReproductiveStats (unsigned int sex) |
double | getReproductiveVar () |
Kinship | |
void | setKinship () |
void | setKinClassCounter (Individual *I1, Individual *I2) |
double | getSibProportion (unsigned int i) |
Pedegree | |
void | setPedegreeCount () |
double | getPedProportion (unsigned int i) |
![]() | |
StatHandler () | |
virtual | ~StatHandler () |
virtual void | clear () |
Empties the _recorders list, they are destroyed in StatHandlerBase::reset(). More... | |
virtual StatRecorder< MPStatHandler > * | add (std::string Title, std::string Name, age_t AGE, unsigned int ARG1, unsigned int ARG2, double(SH::*getStatNoArg)(void), double(SH::*getStatOneArg)(unsigned int), double(SH::*getStatTwoArg)(unsigned int, unsigned int), void(SH::*setStat)(void)) |
Adds a StatRecorder to the list, it is also added to the StatHandlerBase::_stats list. More... | |
![]() | |
StatHandlerBase () | |
virtual | ~StatHandlerBase () |
virtual void | reset () |
Empties the _stats list and calls clear() (defined in the derived class). More... | |
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) |
virtual void | init () |
virtual void | update () |
This function is left empty as the StatServices calls StatRecorder::setVal directly. More... | |
![]() | |
virtual void | init ()=0 |
Inits state. More... | |
virtual void | update ()=0 |
Updates the handler state. More... | |
virtual | ~Handler () |
Private Attributes | |
double | meanEmigrant |
double | meanImigrant |
double | meanResidant |
double | meanKolonisers |
double | meanDeadDisp |
double | ObservedExtinctionRate |
double | _sib_prop [5] |
double | _ped_prop [5] |
double | _var_reprod_success |
Additional Inherited Members | |
![]() | |
typedef std::list< StatRecorder< MPStatHandler > * >::iterator | REC_IT |
![]() | |
std::list< StatRecorder< MPStatHandler > * > | _recorders |
The list of stat recorders. More... | |
![]() | |
Metapop * | _pop |
Link to the current population, set through the link to the StatService. More... | |
A StatHandler for the Metapop SimComponent.
|
inline |
|
inlinevirtual |
References StatHandlerBase::_pop, StatHandler< MPStatHandler >::add(), ADULTS, FEM, getFemNumber(), getMalNumber(), getOffFemNumber(), getOffMalNumber(), Metapop::getPatchNbr(), tstring::int2str(), and OFFSPRG.
Referenced by setStatRecorders(), and setStatsForPopPerPatch().
void MPStatHandler::addPatchAge | ( | ) |
References StatHandlerBase::_pop, StatHandler< MPStatHandler >::add(), ALL, getMeanPatchAge(), getObsrvdExtinctionRate(), getPatchAge(), Metapop::getPatchNbr(), and setObsrvdExtinctionRate().
Referenced by setStatsForPopPerPatch().
double MPStatHandler::get_isAlive | ( | ) |
double MPStatHandler::getAdultSexRatio | ( | ) |
References StatHandlerBase::_pop, ADULTS, FEM, MAL, and Metapop::size().
Referenced by setStatRecorders(), and setStatsForPop().
double MPStatHandler::getEmigrantInPatch | ( | unsigned int | i | ) |
References StatHandlerBase::_pop, Metapop::getPatch(), and Patch::nbEmigrant.
Referenced by setStatsForMigrantsPerPatch().
double MPStatHandler::getFemNumber | ( | unsigned int | i | ) |
References StatHandlerBase::_pop, ADULTS, FEM, and Metapop::size().
Referenced by addIndNumPerPatch().
double MPStatHandler::getImigrateInPatch | ( | unsigned int | i | ) |
References StatHandlerBase::_pop, Metapop::getPatch(), Patch::nbImigrant, and Patch::nbPhilopat.
Referenced by setStatsForMigrantsPerPatch().
double MPStatHandler::getKolonisersInPatch | ( | unsigned int | i | ) |
References StatHandlerBase::_pop, Metapop::getPatch(), and Patch::nbKolonisers.
Referenced by setStatsForMigrantsPerPatch().
double MPStatHandler::getMalNumber | ( | unsigned int | i | ) |
References StatHandlerBase::_pop, ADULTS, MAL, and Metapop::size().
Referenced by addIndNumPerPatch().
double MPStatHandler::getMeanAssignedFecundity | ( | unsigned int | sex | ) |
References StatHandlerBase::_pop, ADLTx, FEM, Patch::get(), Individual::getFecundity(), Metapop::getPatch(), Metapop::getPatchNbr(), MAL, and Patch::size().
double MPStatHandler::getMeanEmigrantPerPatch | ( | ) |
References StatHandlerBase::_pop, Metapop::getPatch(), Metapop::getPatchNbr(), meanEmigrant, and Patch::nbEmigrant.
Referenced by setStatsForMigrants().
double MPStatHandler::getMeanImigrantPerPatch | ( | ) |
References StatHandlerBase::_pop, Patch::get_isExtinct(), Metapop::getPatch(), Metapop::getPatchNbr(), meanImigrant, and Patch::nbImigrant.
Referenced by setStatsForMigrants().
double MPStatHandler::getMeanKolonisersPerPatch | ( | ) |
References StatHandlerBase::_pop, Metapop::getPatch(), Metapop::getPatchNbr(), meanKolonisers, and Patch::nbKolonisers.
Referenced by setStatsForMigrants().
double MPStatHandler::getMeanKolonisersProportion | ( | ) |
References StatHandlerBase::_pop, Patch::get_K(), Metapop::getPatch(), Metapop::getPatchNbr(), and Patch::nbKolonisers.
Referenced by setStatsForMigrants().
double MPStatHandler::getMeanMatings | ( | unsigned int | sex | ) |
References StatHandlerBase::_pop, ADLTx, FEM, Patch::get(), Metapop::getPatch(), Metapop::getPatchNbr(), Individual::getTotMatings(), MAL, and Patch::size().
Referenced by setStatRecorders().
double MPStatHandler::getMeanMigrantRatio | ( | ) |
References meanImigrant, and meanResidant.
Referenced by setStatsForMigrants().
double MPStatHandler::getMeanPatchAge | ( | ) |
References StatHandlerBase::_pop, Patch::get_age(), Metapop::getPatch(), and Metapop::getPatchNbr().
Referenced by addPatchAge().
double MPStatHandler::getMeanPatchDensity | ( | age_t | AGE | ) |
References StatHandlerBase::_pop, ADLTx, ADULTS, Patch::getDensity(), Metapop::getPatch(), Metapop::getPatchNbr(), OFFSx, and Metapop::size().
Referenced by setStatsForDemography().
double MPStatHandler::getMeanPatchDensityVariance | ( | age_t | AGE | ) |
References StatHandlerBase::_pop, ADLTx, ADULTS, Patch::getDensity(), Metapop::getPatch(), Metapop::getPatchNbr(), OFFSx, and Metapop::size().
Referenced by setStatsForDemography().
double MPStatHandler::getMeanPatchSize | ( | unsigned int | age | ) |
References StatHandlerBase::_pop, Metapop::getPatchNbr(), and Metapop::size().
References StatHandlerBase::_pop, Metapop::getPatchNbr(), and Metapop::size().
Referenced by setStatsForDemography().
double MPStatHandler::getMeanResidantPerPatch | ( | ) |
References StatHandlerBase::_pop, Patch::get_isExtinct(), Metapop::getPatch(), Metapop::getPatchNbr(), meanResidant, and Patch::nbPhilopat.
Referenced by setStatsForMigrants().
|
inline |
References ObservedExtinctionRate.
Referenced by addPatchAge(), setStatRecorders(), and setStatsForPop().
double MPStatHandler::getOffFemNumber | ( | unsigned int | i | ) |
References StatHandlerBase::_pop, FEM, OFFSPRG, and Metapop::size().
Referenced by addIndNumPerPatch().
double MPStatHandler::getOffMalNumber | ( | unsigned int | i | ) |
References StatHandlerBase::_pop, MAL, OFFSPRG, and Metapop::size().
Referenced by addIndNumPerPatch().
double MPStatHandler::getOffsprgSexRatio | ( | ) |
References StatHandlerBase::_pop, FEM, MAL, OFFSPRG, and Metapop::size().
Referenced by setStatRecorders(), and setStatsForPop().
double MPStatHandler::getPatchAge | ( | unsigned int | i | ) |
References StatHandlerBase::_pop, Patch::get_age(), and Metapop::getPatch().
Referenced by addPatchAge().
References StatHandlerBase::_pop, and Metapop::size().
|
inline |
double MPStatHandler::getPopulationSize | ( | unsigned int | age | ) |
References StatHandlerBase::_pop, and Metapop::size().
Referenced by setStatsForDemography().
|
inline |
References _var_reprod_success.
Referenced by setStatRecorders().
double MPStatHandler::getResidantInPatch | ( | unsigned int | i | ) |
References StatHandlerBase::_pop, Metapop::getPatch(), and Patch::nbPhilopat.
Referenced by setStatsForMigrantsPerPatch().
|
inline |
void MPStatHandler::setKinClassCounter | ( | Individual * | I1, |
Individual * | I2 | ||
) |
References _sib_prop, Individual::getFatherID(), and Individual::getMotherID().
Referenced by setKinship().
void MPStatHandler::setKinship | ( | ) |
References StatHandlerBase::_pop, _sib_prop, FEM, Patch::get(), Individual::getIsSelfed(), Metapop::getPatch(), Metapop::getPatchNbr(), MAL, OFFSPRG, OFFSx, setKinClassCounter(), Metapop::size(), and Patch::size().
Referenced by setStatRecorders().
void MPStatHandler::setObsrvdExtinctionRate | ( | ) |
References StatHandlerBase::_pop, Metapop::getPatch(), Metapop::getPatchNbr(), Patch::isEmpty(), and ObservedExtinctionRate.
Referenced by addPatchAge(), setStatRecorders(), and setStatsForPop().
void MPStatHandler::setPedegreeCount | ( | ) |
References _ped_prop, StatHandlerBase::_pop, FEM, Patch::get(), Metapop::getPatch(), Metapop::getPatchNbr(), Individual::getPedigreeClass(), MAL, OFFSx, and Patch::size().
Referenced by setStatRecorders().
double MPStatHandler::setReproductiveStats | ( | unsigned int | sex | ) |
References StatHandlerBase::_pop, _var_reprod_success, ADLTx, ADULTS, FEM, Patch::get(), Metapop::getPatch(), Metapop::getPatchNbr(), Individual::getTotRealizedFecundity(), MAL, Metapop::size(), and Patch::size().
Referenced by setStatRecorders().
|
virtual |
Implements StatHandlerBase.
References StatHandler< MPStatHandler >::add(), addIndNumPerPatch(), ADULTS, ALL, FEM, getAdultSexRatio(), getMeanMatings(), getObsrvdExtinctionRate(), getOffsprgSexRatio(), getPedProportion(), getReproductiveVar(), getSibProportion(), MAL, message(), OFFSPRG, setKinship(), setObsrvdExtinctionRate(), setPedegreeCount(), setReproductiveStats(), setStatsForDemography(), setStatsForMigrants(), setStatsForMigrantsPerPatch(), setStatsForPop(), and setStatsForPopPerPatch().
void MPStatHandler::setStatsForDemography | ( | age_t | AGE | ) |
References StatHandler< MPStatHandler >::add(), ADULTS, FEM, getMeanPatchDensity(), getMeanPatchDensityVariance(), getMeanPatchSizePerSex(), getPopulationSize(), and MAL.
Referenced by setStatRecorders(), and setStatsForPop().
void MPStatHandler::setStatsForMigrants | ( | ) |
References StatHandler< MPStatHandler >::add(), ALL, getMeanEmigrantPerPatch(), getMeanImigrantPerPatch(), getMeanKolonisersPerPatch(), getMeanKolonisersProportion(), getMeanMigrantRatio(), and getMeanResidantPerPatch().
Referenced by setStatRecorders().
void MPStatHandler::setStatsForMigrantsPerPatch | ( | ) |
References StatHandlerBase::_pop, StatHandler< MPStatHandler >::add(), ALL, getEmigrantInPatch(), getImigrateInPatch(), getKolonisersInPatch(), Metapop::getPatchNbr(), and getResidantInPatch().
Referenced by setStatRecorders().
void MPStatHandler::setStatsForPop | ( | ) |
References StatHandler< MPStatHandler >::add(), ADULTS, ALL, getAdultSexRatio(), getObsrvdExtinctionRate(), getOffsprgSexRatio(), OFFSPRG, setObsrvdExtinctionRate(), and setStatsForDemography().
Referenced by setStatRecorders().
void MPStatHandler::setStatsForPopPerPatch | ( | ) |
References addIndNumPerPatch(), addPatchAge(), ADULTS, FEM, MAL, and OFFSPRG.
Referenced by setStatRecorders().
|
private |
Referenced by getPedProportion(), and setPedegreeCount().
|
private |
Referenced by getSibProportion(), setKinClassCounter(), and setKinship().
|
private |
Referenced by getReproductiveVar(), and setReproductiveStats().
|
private |
|
private |
Referenced by getMeanEmigrantPerPatch().
|
private |
Referenced by getMeanImigrantPerPatch(), and getMeanMigrantRatio().
|
private |
Referenced by getMeanKolonisersPerPatch().
|
private |
Referenced by getMeanMigrantRatio(), and getMeanResidantPerPatch().
|
private |
Referenced by getObsrvdExtinctionRate(), and setObsrvdExtinctionRate().