Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
Second class in the metapopulation design structure, between the Metapop and Individual classes. More...
#include <metapop.h>
Public Member Functions | |
Patch () | |
~Patch () | |
Patch * | init (unsigned int nbfem, unsigned int nbmal, unsigned int id) |
void | reset_counters () |
void | reset_containers () |
void | setNewGeneration (age_t AGE, Metapop *pop) |
Fills the patch containers corresponding to the age flags passed, for both sexes. More... | |
void | setNewGeneration (age_idx AGE, Metapop *pop) |
Fills the patch container corresponding to the age class index passed, for both sexes. More... | |
void | show_up () |
Setters | |
void | setID (unsigned int i) |
void | set_K (unsigned int k) |
void | set_KFem (unsigned int k) |
void | set_KMal (unsigned int k) |
void | set_isExtinct (bool status) |
void | set_age (unsigned int a) |
Getters | |
unsigned int | getID () |
unsigned int | get_K () |
unsigned int | get_K (sex_t SEX) |
unsigned int | get_KFem () |
unsigned int | get_KMal () |
bool | get_isExtinct () |
unsigned int | get_age () |
bool | isEmpty () |
unsigned int | getAdultsNumber () |
double | getDensity (age_idx age) |
State getter and modifier functions | |
unsigned int | size (age_t AGE) |
Returns the size of the container of the appropriate age class(es) for both sexes. More... | |
unsigned int | size (sex_t SEX, age_t AGE) |
Returns the size of the container for the appropriate sex and age classes present in the age flag. More... | |
unsigned int | size (sex_t SEX, age_idx AGE) |
Returns the size of the container for the appropriate sex and age class. More... | |
unsigned int | size (age_idx AGE) |
Returns the size of the container for the appropriate age class for both sexes. More... | |
Individual * | get (sex_t SEX, age_idx AGE, unsigned int at) |
Returns a pointer to the individual sitting at the index passed. More... | |
void | set (sex_t SEX, age_idx AGE, unsigned int at, Individual *ind) |
Modifies the appropriate container with value of the pointer given. More... | |
void | add (sex_t SEX, age_idx AGE, Individual *ind) |
Adds an individual to the appropriate container, increments its size, eventually resizing it. More... | |
void | assign (sex_t SEX, age_idx AGE, unsigned int n) |
Assigns a new container of given size for the sex and age class passed, sets all values to NULL. More... | |
Individual * | remove (sex_t SEX, age_idx AGE, unsigned int at) |
Removes the individual sitting at the given index in the appropriate container. More... | |
void | move (sex_t SEX, age_idx from, age_idx to, unsigned int at) |
Moves an individual from an age class to an other one. More... | |
void | swap (sex_t SEX, age_idx from, age_idx to) |
Copies all elements in the 'from' age-class container to the 'to' age-class container of the same sex. More... | |
void | clear (sex_t SEX, age_idx AGE) |
Sets the size of the appropriate container to zero. More... | |
void | clear () |
void | flush (sex_t SEX, age_idx AGE, Metapop *pop) |
Removes all individual pointers of the appropriate sex and age class and flush them into the recycling pool. More... | |
void | flush (age_idx AGE, Metapop *pop) |
void | flush (age_t AGE, Metapop *pop) |
Removes all individual pointers of the appropriate sex and age class and flush them into the recycling pool. More... | |
void | flush (Metapop *pop) |
Removes all individual pointers of all sex and age classes and flush them into the recycling pool. More... | |
void | getCopy (sex_t SEX, age_idx AGE, deque< Individual * > &to) |
void | copy2patch (sex_t from_sex, sex_t to_sex, age_idx from_age, age_idx to_age, Patch *to_patch) |
void | copy2patch (sex_t SEX, age_idx AGE, Patch *patch) |
void | copy2patch (age_idx AGE, Patch *patch) |
void | copy2patch (Patch *patch) |
Public Attributes | |
unsigned short | nbEmigrant |
unsigned short | nbImigrant |
unsigned short | nbPhilopat |
short | nbKolonisers |
Private Attributes | |
unsigned int | _ID |
Patch ID is equal to its position in the metapop patch array. More... | |
unsigned int | _K |
Carrying capacity for males and females. More... | |
unsigned int | _KFem |
Sex specific carrying capacity. More... | |
unsigned int | _KMal |
bool | _isExtinct |
Extinction flag. More... | |
unsigned int | _age |
age since last extinction. More... | |
unsigned int | _nb_age_class |
Number of age classes present. More... | |
unsigned int | _sizes [2][3] |
Containers size counters, sex X age. More... | |
unsigned int | _capacities [2][3] |
Total size of the containers, amount of allocated memory. More... | |
deque< Individual * > | _containers [2][3] |
Individuals containers, sex X age. More... | |
Second class in the metapopulation design structure, between the Metapop and Individual classes.
The Patch class is an abstraction of a sub-population or patch concept (also called a deme) in a metapopulation context. It contains the individual containers for the different age classes. Three main age classes are currently implemented, the offspring, post-dispersal and adult classes (see the age_t enum) which are all subdivided into male and female individuals. These containers are accessed using the interface defined here or through the Metapop class interface. The different LCEs will use these interfaces to handle the individuals. They are also responsible to change the age flag of the population (see Metapop).
The individuals are accessed using their age index value and not the age flag value (e.g., using the Patch::get() method). These indexes are defined in the age_idx enum (see type.h) and differ from the age class flag values. For instance the adults' containers have the index 2 (ADLTx = 2) whereas their age flag is 4 (ADULTS = 4). This might be confusing but it saves a lot of checks at runtime! It also allows to give a flag containing several class bits set instead of a unique index value when needed (see the Patch::size() and Metapop::size() suite of functions).
|
inline |
References _capacities, _nb_age_class, _sizes, FEM, and MAL.
Patch::~Patch | ( | ) |
References _containers, _nb_age_class, and _sizes.
|
inline |
Adds an individual to the appropriate container, increments its size, eventually resizing it.
SEX | the sex class of the individual |
AGE | the index of the age class |
ind | the pointer to the individual |
References _capacities, _containers, _K, and _sizes.
Referenced by copy2patch(), LCE_Breed_Selection_Disperse::do_breed(), LCE_Breed_Disperse::do_breed_disperse(), LCE_Breed_Selection::do_breed_selection_FecFitness(), LCE_Breed_Selection::do_breed_selection_OffSurvival(), LCE_Breed_Selection::do_breed_selection_WrightFisher_1sex(), LCE_Breed_Selection::do_breed_selection_WrightFisher_2sex(), TTDeletMutBitstrFH::FHread(), TTNeutralGenesFH::FHread(), TTQuantiFH::FHread(), Metapop::fillPatchFromSource(), LCE_Resize::fillPatchNoBackup(), LCE_Resize::fillPatchWithBackup(), LCE_Cross::generatePedigree(), move(), LCE_Breed_base::NonWrightFisherPopulation(), LCE_Breed_Quanti::NonWrightFisherPopulation(), LCE_Resize::regulateAgeClassWithBackup(), LCE_Cross::sampleAmongPop(), LCE_Cross::sampleWithinPop(), setNewGeneration(), FileServices::subSamplePatch(), LCE_Breed_Wolbachia::wolbachia_model_1(), LCE_Breed_Wolbachia::wolbachia_model_2(), LCE_Breed_base::WrightFisherPopulation(), and LCE_Breed_Quanti::WrightFisherPopulation().
Assigns a new container of given size for the sex and age class passed, sets all values to NULL.
References _capacities, _containers, and _sizes.
Referenced by TTNeutralGenesSH::setHs().
|
inline |
Sets the size of the appropriate container to zero.
Note: no memory operation is performed, the capacity of the container is thus not affected. The individual pointers are not flushed to the recycling pool, they will be overwritten by subsequent operations. It is thus a good idea to consider using Patch::flush to be sure no pointers remained in the container.
SEX | the sex class |
AGE | the index of the age class |
References _sizes.
Referenced by LCE_Resize::buildNewPatchArrayWithBackup(), LCE_Resize::execute(), FileServices::getSampledPop(), and LCE_Resize::removeDesignatedPatch().
References copy2patch(), FEM, and MAL.
|
inline |
References _nb_age_class, copy2patch(), FEM, and MAL.
|
inline |
References _containers, _sizes, and add().
Referenced by LCE_Resize::buildNewPatchArrayWithBackup(), copy2patch(), and LCE_Resize::removeDesignatedPatch().
Removes all individual pointers of the appropriate sex and age class and flush them into the recycling pool.
AGE | an unsigned int containing the flags of the age classes to flush |
pop | the pointer to the metapop for access to the recycling pool |
References _nb_age_class, FEM, flush(), and MAL.
|
inline |
Removes all individual pointers of all sex and age classes and flush them into the recycling pool.
References _nb_age_class, FEM, flush(), and MAL.
Removes all individual pointers of the appropriate sex and age class and flush them into the recycling pool.
Container sizes are reset to null values. Note: not memory operation is performed, the total amount of memory allocated is left untouched.
SEX | the sex class of the individual |
AGE | the index of the age class |
pop | the pointer to the metapop for access to the recycling pool |
References _containers, _sizes, and IndFactory::recycle().
Referenced by LCE_Breed_Selection_Disperse::breed_selection_disperse(), LCE_Breed_base::checkCloning(), LCE_Breed_base::checkSelfing(), LCE_Breed_Disperse::do_breed_disperse(), LCE_Patch_Extinction::do_flush(), LCE_Aging::execute(), flush(), LCE_Disperse_base::reset_counters(), and setNewGeneration().
|
inline |
Returns a pointer to the individual sitting at the index passed.
Note: the get operations are unchecked! It's up to the user to check for overflows.
SEX | the sex class of the individual |
AGE | the index of the age class |
at | the index of the individual in the container |
References _containers.
Referenced by LCE_Selection_base::addPhenotypicSD(), copy2patch(), TTBDMI_SH::countAllele_diplo(), TTBDMI_SH::countAllele_haplo(), MPFileHandler::createAndPrintSample(), LCE_Breed_Selection::do_breed_selection_FecFitness(), LCE_Breed_Selection::do_breed_selection_OffSurvival(), LCE_Breed_Selection::do_breed_selection_WrightFisher_1sex(), LCE_Breed_Selection::do_breed_selection_WrightFisher_2sex(), LCE_Selection_base::doViabilitySelection(), LCE_Disperse_EvolDisp::evoldisp(), TTDeletMutBitstrFH::FHwrite(), TTQFreqExtractor::FHwrite(), Metapop::fillPatchFromSource(), LCE_Resize::fillPatchWithBackup(), LCE_Disperse_EvolDisp::fixdisp(), LCE_Breed_base::fullMonoginy(), LCE_Breed_base::fullPolyginy(), LCE_Breed_base::fullPolyginy_manyMales(), Metapop::get(), LCE_Breed_Disperse::get_parent(), TTNeutralGenesSH::getDxyPerPatch(), LCE_Selection_base::getMaxPatchFitness(), MPStatHandler::getMeanAssignedFecundity(), TTDispersalSH::getMeanDispRate(), TTDispersalSH::getMeanDispRateInPatch(), TTDeletMutBitstrSH::getMeanFecWithPatchMate(), TTWolbachiaSH::getMeanFemaleInfection_perPatch(), TTDispersalSH::getMeanFemDispRate(), LCE_Selection_base::getMeanFitness(), TTDispersalSH::getMeanMalDispRate(), TTWolbachiaSH::getMeanMaleInfection_perPatch(), MPStatHandler::getMeanMatings(), TTWolbachiaSH::getMeanOffsprgFemaleInfection_perPatch(), TTWolbachiaSH::getMeanOffsprgInfection(), TTWolbachiaSH::getMeanOffsprgMaleInfection_perPatch(), LCE_Selection_base::getMeanPatchFitness(), TTDispersalSH::getOffsprgMeanDispRate(), TTDeletMutBitstrSH::getPatchLoad(), TTQuantiSH::getSNPalleleFreqInPatch(), TTQuantiSH::getVaNoDominance(), TTQuantiSH::getVaWithDominance(), LCE_Breed_Wolbachia::hasInfectedFemale(), LCE_Breed_Wolbachia::inoculate_wolbachia(), LCE_Disperse_ConstDisp::MigratePatch_AbsorbingBorder(), LCE_Breed_base::NonWrightFisherPopulation(), LCE_Breed_Quanti::NonWrightFisherPopulation(), LCE_Breed_base::partialMonoginy(), LCE_Breed_base::partialSelfing(), LCE_SelectionFH::print(), TTQuantiFH::print(), TTQuantiFH::print_PLINK_FAM(), TTNeutralGenesFH::print_PLINK_PED(), TTQuantiFH::print_PLINK_PED(), MPFileHandler::printNoSample(), LCE_Breed_base::random_hermaphrodite(), LCE_Breed_base::RandomMating(), LCE_Resize::regulateAgeClassNoBackup(), LCE_Resize::regulateAgeClassWithBackup(), LCE_Cross::sampleAmongPop(), TTNeutralGenesSH::setAdults_Theta(), TTNeutralGenesSH::setAlleleTables(), TTNeutralGenesSH::setCoaMatrix(), LCE_SelectionSH::setDataTable(), TTDeletMutBitstrSH::setDeletStats(), TTNeutralGenesSH::setHeteroTable(), TTNeutralGenesSH::setHo(), TTNeutralGenesSH::setHo2(), LCE_QuantiModifier::setIndPhenotype(), LCE_Breed_Quanti::setIndPhenotype(), TTWolbachiaSH::setInfectionStats(), MPStatHandler::setKinship(), TTDeletMutBitstrSH::setMeanViability(), MPStatHandler::setPedegreeCount(), MPStatHandler::setReproductiveStats(), LCE_Breed_Selection::setReproScaledFitness_sum(), TTNeutralGenesSH::setSibStats(), TTDeletMutBitstrSH::setViability(), store_quanti_trait_values(), FileServices::subSamplePatch(), LCE_Breed_Wolbachia::wolbachia_model_1(), LCE_Breed_Wolbachia::wolbachia_model_2(), LCE_Breed_base::WrightFisherPopulation(), LCE_Breed_Quanti::WrightFisherPopulation(), TTBDMI_FH::write_diplo(), TTBDMI_FH::write_haplo(), TTNeutralGenesFH::write_patch_FSTAT(), TTNeutralGenesFH::write_patch_GENEPOP(), and TTNeutralGenesFH::write_patch_TAB().
|
inline |
References _age.
Referenced by LCE_Aging::execute(), MPStatHandler::getMeanPatchAge(), and MPStatHandler::getPatchAge().
|
inline |
References _isExtinct.
Referenced by LCE_Disperse_EvolDisp::execute(), LCE_Patch_Extinction::execute(), MPStatHandler::getMeanImigrantPerPatch(), MPStatHandler::getMeanResidantPerPatch(), LCE_Breed_Wolbachia::inoculate_wolbachia(), LCE_Disperse_ConstDisp::Migrate(), LCE_Breed_Disperse::numFemOffspring_colonizers(), and LCE_Breed_Disperse::numMalOffspring_random_colonizers().
|
inline |
References _K.
Referenced by LCE_Breed_Disperse::conditionalLogisticGrowth(), LCE_Breed_Disperse::conditionalStochasticLogisticGrowth(), LCE_Breed_Selection::do_breed_selection_WrightFisher_1sex(), LCE_Breed_Selection::do_breed_selection_WrightFisher_2sex(), LCE_Patch_Extinction::execute(), LCE_Breed_Disperse::fixedFecundityGrowth(), MPStatHandler::getMeanKolonisersProportion(), FileServices::getSampledPop(), LCE_Breed_Disperse::instantGrowth(), LCE_Breed_Disperse::logisticGrowth(), LCE_Regulation::regulatePatch(), LCE_Breed_Disperse::stochasticFecundityGrowth(), LCE_Breed_base::WrightFisherPopulation(), and LCE_Breed_Quanti::WrightFisherPopulation().
|
inline |
References _KFem.
Referenced by LCE_Aging::execute(), LCE_Resize::fillPatchNoBackup(), LCE_Resize::fillPatchWithBackup(), FileServices::getSampledPop(), LCE_Resize::regulateAgeClassNoBackup(), and LCE_Resize::regulateAgeClassWithBackup().
|
inline |
References _KMal.
Referenced by LCE_Aging::execute(), LCE_Resize::fillPatchNoBackup(), LCE_Resize::fillPatchWithBackup(), FileServices::getSampledPop(), LCE_Resize::regulateAgeClassNoBackup(), and LCE_Resize::regulateAgeClassWithBackup().
|
inline |
|
inline |
References _containers, and _sizes.
Referenced by LCE_Cross::execute().
|
inline |
Referenced by MPStatHandler::getMeanPatchDensity(), and MPStatHandler::getMeanPatchDensityVariance().
|
inline |
References _ID.
Referenced by TTBDMI_SH::countAllele_diplo(), TTBDMI_SH::countAllele_haplo(), MPFileHandler::createAndPrintSample(), LCE_Patch_Extinction::do_remove(), LCE_Resize::fillPatchNoBackup(), LCE_Breed_Disperse::fixedFecundityGrowth(), LCE_Patch_Extinction::get_harvest_size(), TTQuantiSH::getVaWithDominance(), LCE_Breed_Disperse::logisticGrowth(), TTQuantiFH::print(), MPFileHandler::printNoSample(), LCE_Resize::removeDesignatedPatch(), LCE_Cross::sampleAmongPop(), LCE_Cross::sampleWithinPop(), LCE_Breed_Selection::setReproScaledFitness_sum(), LCE_Breed_Disperse::stochasticFecundityGrowth(), TTBDMI_FH::write_diplo(), TTBDMI_FH::write_haplo(), TTNeutralGenesFH::write_patch_FSTAT(), TTNeutralGenesFH::write_patch_GENEPOP(), and TTNeutralGenesFH::write_patch_TAB().
References _age, _ID, _isExtinct, _K, _KFem, _KMal, reset_containers(), and reset_counters().
Referenced by LCE_Resize::execute().
|
inline |
Moves an individual from an age class to an other one.
Note: both containers are transformed by this operation. The 'from' container size is reduced by one while the 'to' container size is increased by one.
SEX | the sex class of the individual |
from | the original age class of the individual |
to | the destination age class of the individual |
at | the index of the individual in the container |
References _containers, add(), and remove().
Referenced by LCE_Disperse_EvolDisp::evoldisp(), LCE_Aging::execute(), and LCE_Disperse_EvolDisp::fixdisp().
|
inline |
Removes the individual sitting at the given index in the appropriate container.
SEX | the sex class of the individual |
AGE | the index of the age class |
at | the index of the individual in the container |
References _containers, _sizes, and error().
Referenced by LCE_Patch_Extinction::do_remove(), LCE_Selection_base::doViabilitySelection(), LCE_Disperse_EvolDisp::evoldisp(), LCE_Resize::fillPatchWithBackup(), LCE_Disperse_EvolDisp::fixdisp(), LCE_Disperse_ConstDisp::MigratePatch_AbsorbingBorder(), move(), LCE_Resize::regulateAgeClassNoBackup(), LCE_Resize::regulateAgeClassWithBackup(), and LCE_Regulation::regulatePatch().
void Patch::reset_containers | ( | ) |
References _capacities, _containers, _KFem, _KMal, _nb_age_class, _sizes, FEM, and MAL.
Referenced by init().
void Patch::reset_counters | ( | ) |
References nbEmigrant, nbImigrant, nbKolonisers, and nbPhilopat.
Referenced by init(), and LCE_Disperse_base::reset_counters().
|
inline |
Modifies the appropriate container with value of the pointer given.
SEX | the sex class of the individual |
AGE | the index of the age class |
at | the index of the individual in the container |
ind | the pointer to the individual |
References _containers.
|
inline |
References _age.
Referenced by LCE_Patch_Extinction::do_flush(), and LCE_Aging::execute().
|
inline |
References _isExtinct.
Referenced by LCE_Patch_Extinction::do_flush(), and LCE_Aging::execute().
|
inline |
References _K.
Referenced by FileServices::getSampledPop().
|
inline |
References _KFem.
Referenced by FileServices::getSampledPop(), and LCE_Resize::updatePatchCapacities().
|
inline |
References _KMal.
Referenced by FileServices::getSampledPop(), and LCE_Resize::updatePatchCapacities().
|
inline |
References _ID.
Referenced by FileServices::getSampledPop().
Fills the patch container corresponding to the age class index passed, for both sexes.
References _ID, _KFem, _KMal, add(), Individual::create_first_gen(), FEM, flush(), IndFactory::makeNewIndividual(), MAL, and size().
Fills the patch containers corresponding to the age flags passed, for both sexes.
References _nb_age_class, and setNewGeneration().
Referenced by setNewGeneration().
void Patch::show_up | ( | ) |
Returns the size of the container of the appropriate age class(es) for both sexes.
AGE | the flag value of the age class |
References FEM, MAL, and size().
Referenced by LCE_Selection_base::addPhenotypicSD(), LCE_Breed_Selection_Disperse::breed_selection_disperse(), LCE_Breed_base::checkCloning(), LCE_Breed_base::checkNoSelfing(), LCE_Breed_base::checkPolygyny(), LCE_Breed_base::checkSelfing(), LCE_Breed_Disperse::conditionalLogisticGrowth(), LCE_Breed_Disperse::conditionalStochasticLogisticGrowth(), TTBDMI_SH::countAllele_diplo(), TTBDMI_SH::countAllele_haplo(), MPFileHandler::createAndPrintSample(), LCE_Breed_Disperse::do_breed_disperse(), LCE_Breed_Selection::do_breed_selection_FecFitness(), LCE_Breed_Selection::do_breed_selection_OffSurvival(), LCE_Breed_Selection::do_breed_selection_WrightFisher_1sex(), LCE_Breed_Selection::do_breed_selection_WrightFisher_2sex(), LCE_Patch_Extinction::do_remove(), LCE_Selection_base::doViabilitySelection(), LCE_Disperse_EvolDisp::evoldisp(), LCE_Disperse_EvolDisp::execute(), LCE_Aging::execute(), LCE_Patch_Extinction::execute(), LCE_Cross::execute(), LCE_SelectionFH::FHwrite(), TTDeletMutBitstrFH::FHwrite(), TTQFreqExtractor::FHwrite(), Metapop::fillPatchFromSource(), LCE_Resize::fillPatchNoBackup(), LCE_Resize::fillPatchWithBackup(), LCE_Disperse_EvolDisp::fixdisp(), LCE_Breed_base::fullMonoginy(), LCE_Breed_base::fullPolyginy_manyMales(), LCE_Patch_Extinction::get_harvest_size(), LCE_Breed_Disperse::get_parent(), getAdultsNumber(), getDensity(), TTNeutralGenesSH::getDxyPerPatch(), TTDeletMutBitstrSH::getLoad(), LCE_Selection_base::getMaxPatchFitness(), MPStatHandler::getMeanAssignedFecundity(), TTDispersalSH::getMeanDispRate(), TTDispersalSH::getMeanDispRateInPatch(), TTDeletMutBitstrSH::getMeanFecWithPatchMate(), TTWolbachiaSH::getMeanFemaleInfection_perPatch(), TTDispersalSH::getMeanFemDispRate(), LCE_Selection_base::getMeanFitness(), TTDispersalSH::getMeanMalDispRate(), TTWolbachiaSH::getMeanMaleInfection_perPatch(), MPStatHandler::getMeanMatings(), TTWolbachiaSH::getMeanOffsprgFemaleInfection_perPatch(), TTWolbachiaSH::getMeanOffsprgInfection(), TTWolbachiaSH::getMeanOffsprgMaleInfection_perPatch(), LCE_Selection_base::getMeanPatchFitness(), LCE_SelectionSH::getMeanPatchFitness(), TTDispersalSH::getOffsprgMeanDispRate(), TTDeletMutBitstrSH::getPatchLoad(), TTQuantiSH::getSNPalleleFreqInPatch(), TTQuantiSH::getVaNoDominance(), LCE_SelectionSH::getVarPatchFitness(), TTQuantiSH::getVaWithDominance(), LCE_Breed_Wolbachia::hasInfectedFemale(), isEmpty(), LCE_Breed_Disperse::logisticGrowth(), LCE_Breed_Disperse::mate_selfing(), LCE_Disperse_ConstDisp::Migrate(), LCE_Disperse_ConstDisp::MigratePatch(), LCE_Disperse_ConstDisp::MigratePatch_AbsorbingBorder(), LCE_Disperse_ConstDisp::MigratePatchByNumber(), LCE_Breed_base::NonWrightFisherPopulation(), LCE_Breed_Quanti::NonWrightFisherPopulation(), LCE_Breed_Disperse::numFemOffspring(), LCE_Breed_Disperse::numMalOffspring_random(), LCE_Breed_base::partialMonoginy(), LCE_Breed_base::partialSelfing(), LCE_SelectionFH::print(), TTQuantiFH::print(), TTQuantiFH::print_PLINK_FAM(), TTNeutralGenesFH::print_PLINK_PED(), TTQuantiFH::print_PLINK_PED(), MPFileHandler::printNoSample(), LCE_Breed_base::random_hermaphrodite(), LCE_Breed_base::RandomMating(), LCE_Resize::regulateAgeClassNoBackup(), LCE_Resize::regulateAgeClassWithBackup(), LCE_Regulation::regulatePatch(), LCE_Cross::sampleAmongPop(), LCE_Cross::sampleWithinPop(), LCE_Selection_base::set_std_rate_of_change(), TTNeutralGenesSH::setAdults_Theta(), TTNeutralGenesSH::setAlleleTables(), TTNeutralGenesSH::setCoaMatrix(), LCE_SelectionSH::setDataTable(), TTQuantiSH::setDataTables(), TTDeletMutBitstrSH::setDeletStats(), TTDeletMutBitstrSH::setFst(), TTNeutralGenesSH::setHeteroTable(), TTNeutralGenesSH::setHeterozygosity(), TTNeutralGenesSH::setHo(), TTNeutralGenesSH::setHo2(), TTNeutralGenesSH::setHs(), TTNeutralGenesSH::setHs2(), LCE_QuantiModifier::setIndPhenotype(), LCE_Breed_Quanti::setIndPhenotype(), TTWolbachiaSH::setInfectionStats(), MPStatHandler::setKinship(), TTDeletMutBitstrSH::setMeanViability(), setNewGeneration(), MPStatHandler::setPedegreeCount(), MPStatHandler::setReproductiveStats(), TTNeutralGenesSH::setSibStats(), TTBDMI_SH::setStats(), TTDeletMutBitstrSH::setViability(), size(), Metapop::size(), FileServices::subSamplePatch(), LCE_Breed_Wolbachia::wolbachia_model_1(), LCE_Breed_Wolbachia::wolbachia_model_2(), LCE_Breed_base::WrightFisherPopulation(), LCE_Breed_Quanti::WrightFisherPopulation(), TTBDMI_FH::write_diplo(), TTBDMI_FH::write_haplo(), TTNeutralGenesFH::write_patch_FSTAT(), TTNeutralGenesFH::write_patch_GENEPOP(), and TTNeutralGenesFH::write_patch_TAB().
Returns the size of the container for the appropriate sex and age classes present in the age flag.
SEX | the sex class |
AGE | the flag value of the age class |
References _nb_age_class, and _sizes.
Copies all elements in the 'from' age-class container to the 'to' age-class container of the same sex.
The previous elements of the 'to' container are overwritten, it is thus worth considering using flush() before swaping to avoid memory leaks! The size of the 'from' container is set to 0.
SEX | the sex class of the individual |
from | the original age class of the individual |
to | the destination age class of the individual |
References _capacities, _containers, _sizes, and clear().
Referenced by LCE_Disperse_base::swapPostDisp().
|
private |
|
private |
Total size of the containers, amount of allocated memory.
Referenced by add(), assign(), Patch(), reset_containers(), and swap().
|
private |
|
private |
|
private |
Extinction flag.
Referenced by get_isExtinct(), init(), and set_isExtinct().
|
private |
|
private |
Sex specific carrying capacity.
Referenced by get_K(), get_KFem(), init(), reset_containers(), set_KFem(), setNewGeneration(), and show_up().
|
private |
Referenced by get_K(), get_KMal(), init(), reset_containers(), set_KMal(), setNewGeneration(), and show_up().
|
private |
Number of age classes present.
Referenced by copy2patch(), flush(), Patch(), reset_containers(), setNewGeneration(), show_up(), size(), and ~Patch().
|
private |
unsigned short Patch::nbEmigrant |
Referenced by LCE_Disperse_EvolDisp::evoldisp(), LCE_Breed_Disperse::execute(), LCE_Breed_Selection_Disperse::execute(), LCE_Disperse_ConstDisp::execute(), LCE_Disperse_EvolDisp::fixdisp(), LCE_Breed_Disperse::get_parent(), MPStatHandler::getEmigrantInPatch(), MPStatHandler::getMeanEmigrantPerPatch(), LCE_Disperse_ConstDisp::MigratePatch(), LCE_Disperse_ConstDisp::MigratePatch_AbsorbingBorder(), LCE_Disperse_ConstDisp::MigratePatchByNumber(), and reset_counters().
unsigned short Patch::nbImigrant |
Referenced by LCE_Disperse_EvolDisp::evoldisp(), LCE_Breed_Disperse::execute(), LCE_Breed_Selection_Disperse::execute(), LCE_Disperse_EvolDisp::fixdisp(), LCE_Breed_Disperse::get_parent(), MPStatHandler::getImigrateInPatch(), MPStatHandler::getMeanImigrantPerPatch(), LCE_Disperse_ConstDisp::MigratePatch(), LCE_Disperse_ConstDisp::MigratePatch_AbsorbingBorder(), LCE_Disperse_ConstDisp::MigratePatchByNumber(), and reset_counters().
short Patch::nbKolonisers |
unsigned short Patch::nbPhilopat |
Referenced by LCE_Disperse_EvolDisp::evoldisp(), LCE_Breed_Disperse::execute(), LCE_Breed_Selection_Disperse::execute(), LCE_Disperse_EvolDisp::fixdisp(), LCE_Breed_Disperse::get_parent(), MPStatHandler::getImigrateInPatch(), MPStatHandler::getMeanResidantPerPatch(), MPStatHandler::getResidantInPatch(), LCE_Disperse_ConstDisp::MigratePatch(), LCE_Disperse_ConstDisp::MigratePatch_AbsorbingBorder(), LCE_Disperse_ConstDisp::MigratePatchByNumber(), and reset_counters().