331 }
while(fem == motherIndex && thePatch->
size(
FEM,
ADLTx) != 1);
A class to manage the files associated with each components of the simulation.
Definition: fileservices.h:52
This class contains traits along with other individual information (sex, pedigree,...
Definition: individual.h:49
Implementation of the basic breeding and mating procedures, does not link to any trait.
Definition: LCEbreed.h:400
virtual void loadStatServices(StatServices *loader)
Definition: LCEbreed.h:451
Individual *(LCE_Breed_base::* AssortativeMatingFuncPtr)(Patch *, Individual *, unsigned int)
Definition: LCEbreed.h:416
double _assortative_value
Definition: LCEbreed.h:402
double _prop_non_assortative
Definition: LCEbreed.h:412
void setPhenotypeAncestryBased(Individual *ind)
virtual age_t requiredAgeClass()
Definition: LCEbreed.h:455
Individual * assortative_mating(deque< Individual * > &males, Individual *mother, unsigned int motherIndex)
Returns a pointer to a male chosen relative to its phenotypic resemblance with the mother.
Definition: LCEbreed.cc:720
virtual ~LCE_BreedAssortativeMating()
Definition: LCEbreed.h:423
virtual age_t addAgeClass()
Definition: LCEbreed.h:454
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEbreed.h:452
double _assortative_tolerance
Definition: LCEbreed.h:405
bool testAssortativeMatingCouple(const double female_trait_value, const double male_trait_value)
Test whether male and female match for mating.
Definition: LCEbreed.cc:771
Individual *(LCE_Breed_base::* MatingFuncPtr_base)(Patch *, Individual *, unsigned int)
Definition: LCEbreed.h:414
std::function< bool(double, double)> _assortative_predicate
Definition: LCEbreed.h:410
virtual age_t removeAgeClass()
Definition: LCEbreed.h:453
double assortative_value_with_tolerance
Definition: LCEbreed.h:407
Individual * breed_lamprey(Individual *mother, Individual *father, unsigned int LocalPatch)
virtual void execute()
Definition: LCEbreed.cc:643
virtual void loadFileServices(FileServices *loader)
Definition: LCEbreed.h:450
virtual LifeCycleEvent * clone()
Definition: LCEbreed.h:448
LCE_BreedAssortativeMating()
Definition: LCEbreed.cc:539
virtual bool setParameters()
Definition: LCEbreed.cc:556
void setPhenotypeMotherInherited(Individual *ind)
void ScrambleContainer(const int length, deque< Individual * > &array)
Definition: LCEbreed.cc:789
Individual * non_assortative_mating(Patch *patch, Individual *mother, unsigned int motherIndex)
Proceed with non-assortative mating, choosing a male at random in the patch, conditioned on him being...
Definition: LCEbreed.cc:702
Base class for the breeding (and mating) life cycle events.
Definition: LCEbreed.h:46
bool checkPolygyny(Patch *thePatch)
Checks whether mating will take place in the current patch when mating is polygynous.
Definition: LCEbreed.h:190
Individual * partialPolyginy_manyMales(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns a pointer to a male from a patch chosen at random if _mating_proportion != 1,...
Definition: LCEbreed.h:274
Individual * partialMonoginy(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns a pointer to a male with same index as mother (if available) from the focal patch.
Definition: LCEbreed.h:302
sex_t getOffsprgSex()
Definition: LCEbreed.h:114
void NonWrightFisherPopulation()
Definition: LCEbreed.cc:388
unsigned int _alpha_male
Definition: LCEbreed.h:51
Individual * fullSelfing(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns the mother pointer.
Definition: LCEbreed.h:315
bool isWrightFisher()
Definition: LCEbreed.h:120
void WrightFisherPopulation()
Definition: LCEbreed.cc:439
virtual ~LCE_Breed_base()
Definition: LCEbreed.h:74
double getFixedFecundity(double mean)
Definition: LCEbreed.h:105
sex_t getOffsprgSexSelfing()
Definition: LCEbreed.h:117
Individual * partialPolyginy(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns a pointer to a male from a patch chosen at random if _mating_proportion != 1,...
Definition: LCEbreed.h:260
Individual * breed(Individual *mother, Individual *father, unsigned int LocalPatch)
Makes a new individual with the right parents.
Definition: LCEbreed.cc:353
Individual * RandomMating(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns a pointer to a male drawn randomly from a patch.
Definition: LCEbreed.h:230
int getMatingSystem()
Definition: LCEbreed.h:102
Individual * fullMonoginy(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns a pointer to a male with same index as mother (if available) from the focal patch.
Definition: LCEbreed.h:288
double getFecundity(double mean)
Definition: LCEbreed.h:113
bool _do_inherit
Definition: LCEbreed.h:53
virtual Individual * getFatherPtr(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Calls the mating function according to the model chosen using the function pointer,...
Definition: LCEbreed.h:82
double getGaussianFecundity(double mean)
Definition: LCEbreed.h:106
Individual * makeOffspring(Individual *ind)
Last step of the breeding process, does inheritance and mutation of the parents' genes.
Definition: LCEbreed.cc:341
double _sd_fecundity
Definition: LCEbreed.h:52
sex_t(LCE_Breed_base::* GetOffsprgSex)()
Definition: LCEbreed.h:64
Individual * random_hermaphrodite(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns a random female from the patch, will be the same mother with probability 1/N (Wright-Fisher m...
Definition: LCEbreed.h:342
double(LCE_Breed_base::* FecundityFuncPtr)(double mean)
Definition: LCEbreed.h:62
Individual * do_breed(Individual *mother, Individual *father, unsigned int LocalPatch)
Calls the breeding function unsing its pointer.
Definition: LCEbreed.h:164
double getMatingProportion()
Definition: LCEbreed.h:100
void(LCE_Breed_base::* PopModelFuncPtr)(void)
Definition: LCEbreed.h:65
double getLogNormalFecundity(double mean)
Definition: LCEbreed.h:109
Individual * breed_cloning(Individual *mother, Individual *father, unsigned int LocalPatch)
Makes a new individual by doing a deep copy of the mother (copies the mother's genes into the offspri...
Definition: LCEbreed.cc:360
Individual *(LCE_Breed_base::* DoBreedFuncPtr)(Individual *mother, Individual *father, unsigned int LocalPatch)
Definition: LCEbreed.h:61
double _mating_proportion
Definition: LCEbreed.h:52
bool setMatingSystem()
Definition: LCEbreed.cc:84
bool checkCloning(Patch *thePatch)
Checks whether mating will take place in the current patch when mating is cloning.
Definition: LCEbreed.h:215
bool checkNoSelfing(Patch *thePatch)
Checks whether mating will take place in the current patch when mating is not selfing or cloning.
Definition: LCEbreed.h:181
bool setFecundity()
Definition: LCEbreed.cc:253
sex_t getOffsprgSexRandom()
Definition: LCEbreed.h:115
bool doInheritance()
Definition: LCEbreed.h:103
bool checkMatingCondition(Patch *thePatch)
Checks if any mating will take place in the patch passed as argument.
Definition: LCEbreed.h:173
bool(LCE_Breed_base::* CheckMatingConditionFuncPtr)(Patch *thePatch)
Definition: LCEbreed.h:63
double getPoissonFecundity(double mean)
Definition: LCEbreed.h:104
sex_t getOffsprgSexFixed()
Definition: LCEbreed.cc:331
unsigned int _mating_males
Definition: LCEbreed.h:50
LCE_Breed_base()
Definition: LCEbreed.cc:46
Individual * partialSelfing(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns the mother pointer or a random female if _mating_proportion != 1.
Definition: LCEbreed.h:325
Individual * fullPolyginy_manyMales(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns a pointer to one of the first _mating_males males of the patch.
Definition: LCEbreed.h:247
sex_t getOffsprgSexCloning()
Definition: LCEbreed.h:118
TMatrix _mean_fecundity
Definition: LCEbreed.h:68
bool checkSelfing(Patch *thePatch)
Checks whether mating will take place in the current patch when mating is selfing.
Definition: LCEbreed.h:205
Individual * fullPolyginy(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns a pointer to the alpha male of the patch.
Definition: LCEbreed.h:239
int _mating_system
Definition: LCEbreed.h:49
bool setSexRatio()
Definition: LCEbreed.cc:213
Individual *(LCE_Breed_base::* MatingFuncPtr)(Patch *, Individual *, unsigned int)
Definition: LCEbreed.h:60
double getMeanFecundity(unsigned int patch)
Definition: LCEbreed.h:101
double getFecundity(unsigned int patch)
Definition: LCEbreed.h:112
virtual bool setParameters()
Definition: LCEbreed.cc:77
Implementation of the basic breeding and mating procedures, does not link to any trait.
Definition: LCEbreed.h:363
virtual age_t requiredAgeClass()
Definition: LCEbreed.h:383
virtual bool setParameters()
Definition: LCEbreed.cc:499
virtual void loadFileServices(FileServices *loader)
Definition: LCEbreed.h:378
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEbreed.h:380
virtual void execute()
Definition: LCEbreed.cc:506
virtual LifeCycleEvent * clone()
Definition: LCEbreed.h:376
virtual void loadStatServices(StatServices *loader)
Definition: LCEbreed.h:379
virtual ~LCE_Breed()
Definition: LCEbreed.h:369
LCE_Breed()
Definition: LCEbreed.h:367
virtual age_t removeAgeClass()
Definition: LCEbreed.h:381
virtual age_t addAgeClass()
Definition: LCEbreed.cc:524
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:73
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:81
bool isSet()
Definition: param.h:140
Second class in the metapopulation design structure, between the Metapop and Individual classes.
Definition: metapop.h:432
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:498
Individual * get(sex_t SEX, age_idx AGE, unsigned int at)
Returns a pointer to the individual sitting at the index passed.
Definition: metapop.h:534
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 recyclin...
Definition: metapop.h:685
static double Poisson(double mean)
From the Numerical Recieps.
Definition: Uniform.h:219
static double Gaussian(double sigma)
Definition: Uniform.h:261
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:124
static bool RandBool()
Returns a random boolean.
Definition: Uniform.h:162
static double LogNormal(double zeta, double sigma)
Definition: Uniform.h:357
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:45
virtual Param * get_parameter(std::string name)
Param getter.
Definition: simcomponent.h:139
The Service class used to manage the StatHandler objects.
Definition: statservices.h:50
A class to handle matrix in params, coerces matrix into a vector of same total size.
Definition: tmatrix.h:50
double get(unsigned int i, unsigned int j) const
Accessor to element at row i and column j.
Definition: tmatrix.h:193
sex_t
Sex types, males are always 0 and females 1!!
Definition: types.h:36
@ FEM
Definition: types.h:37
@ MAL
Definition: types.h:37
unsigned int age_t
Age class flags.
Definition: types.h:46
#define ADULTS
Adults age class flag (breeders).
Definition: types.h:54
#define OFFSPRG
Offspring age class flag.
Definition: types.h:50
@ ADLTx
Definition: types.h:42