170 unsigned int natalPatch);
342 }
while(fem == motherIndex && thePatch->
size(
FEM,
ADLTx) != 1);
A class to manage the files associated with each components of the simulation.
Definition: fileservices.h:50
This class contains traits along with other individual information (sex, pedigree,...
Definition: individual.h:47
Implementation of the basic breeding and mating procedures, does not link to any trait.
Definition: LCEbreed.h:411
virtual void loadStatServices(StatServices *loader)
Definition: LCEbreed.h:462
Individual *(LCE_Breed_base::* AssortativeMatingFuncPtr)(Patch *, Individual *, unsigned int)
Definition: LCEbreed.h:427
double _assortative_value
Definition: LCEbreed.h:413
double _prop_non_assortative
Definition: LCEbreed.h:423
void setPhenotypeAncestryBased(Individual *ind)
virtual age_t requiredAgeClass()
Definition: LCEbreed.h:466
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:790
virtual ~LCE_BreedAssortativeMating()
Definition: LCEbreed.h:434
virtual age_t addAgeClass()
Definition: LCEbreed.h:465
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEbreed.h:463
double _assortative_tolerance
Definition: LCEbreed.h:416
bool testAssortativeMatingCouple(const double female_trait_value, const double male_trait_value)
Test whether male and female match for mating.
Definition: LCEbreed.cc:841
Individual *(LCE_Breed_base::* MatingFuncPtr_base)(Patch *, Individual *, unsigned int)
Definition: LCEbreed.h:425
std::function< bool(double, double)> _assortative_predicate
Definition: LCEbreed.h:421
virtual age_t removeAgeClass()
Definition: LCEbreed.h:464
double assortative_value_with_tolerance
Definition: LCEbreed.h:418
Individual * breed_lamprey(Individual *mother, Individual *father, unsigned int LocalPatch)
virtual void execute()
Definition: LCEbreed.cc:713
virtual void loadFileServices(FileServices *loader)
Definition: LCEbreed.h:461
virtual LifeCycleEvent * clone()
Definition: LCEbreed.h:459
LCE_BreedAssortativeMating()
Definition: LCEbreed.cc:609
virtual bool setParameters()
Definition: LCEbreed.cc:626
void setPhenotypeMotherInherited(Individual *ind)
void ScrambleContainer(const int length, deque< Individual * > &array)
Definition: LCEbreed.cc:859
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:772
Base class for the breeding (and mating) life cycle events.
Definition: LCEbreed.h:44
bool checkPolygyny(Patch *thePatch)
Checks whether mating will take place in the current patch when mating is polygynous.
Definition: LCEbreed.h:201
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:285
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:313
sex_t getOffsprgSex()
Definition: LCEbreed.h:112
void NonWrightFisherPopulation()
Definition: LCEbreed.cc:406
unsigned int _alpha_male
Definition: LCEbreed.h:49
Individual * fullSelfing(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns the mother pointer.
Definition: LCEbreed.h:326
bool isWrightFisher()
Definition: LCEbreed.h:118
void WrightFisherPopulation()
Definition: LCEbreed.cc:457
virtual ~LCE_Breed_base()
Definition: LCEbreed.h:72
double getFixedFecundity(double mean)
Definition: LCEbreed.h:103
sex_t getOffsprgSexSelfing()
Definition: LCEbreed.h:115
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:271
Individual * breed(Individual *mother, Individual *father, unsigned int LocalPatch)
Makes a new individual with the right parents.
Definition: LCEbreed.cc:371
Individual * RandomMating(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns a pointer to a male drawn randomly from a patch.
Definition: LCEbreed.h:241
int getMatingSystem()
Definition: LCEbreed.h:100
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:299
double getFecundity(double mean)
Definition: LCEbreed.h:111
bool _do_inherit
Definition: LCEbreed.h:51
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:80
double getGaussianFecundity(double mean)
Definition: LCEbreed.h:104
Individual * makeOffspring(Individual *ind)
Last step of the breeding process, does inheritance and mutation of the parents' genes.
Definition: LCEbreed.cc:349
double _sd_fecundity
Definition: LCEbreed.h:50
sex_t(LCE_Breed_base::* GetOffsprgSex)()
Definition: LCEbreed.h:62
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:353
double(LCE_Breed_base::* FecundityFuncPtr)(double mean)
Definition: LCEbreed.h:60
Individual * do_breed(Individual *mother, Individual *father, unsigned int LocalPatch)
Calls the breeding function unsing its pointer.
Definition: LCEbreed.h:175
double getMatingProportion()
Definition: LCEbreed.h:98
void(LCE_Breed_base::* PopModelFuncPtr)(void)
Definition: LCEbreed.h:63
double getLogNormalFecundity(double mean)
Definition: LCEbreed.h:107
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:378
Individual *(LCE_Breed_base::* DoBreedFuncPtr)(Individual *mother, Individual *father, unsigned int LocalPatch)
Definition: LCEbreed.h:59
double _mating_proportion
Definition: LCEbreed.h:50
bool setMatingSystem()
Definition: LCEbreed.cc:82
bool checkCloning(Patch *thePatch)
Checks whether mating will take place in the current patch when mating is cloning.
Definition: LCEbreed.h:226
void doAgingInWFpop()
Definition: LCEbreed.cc:546
bool checkNoSelfing(Patch *thePatch)
Checks whether mating will take place in the current patch when mating is not selfing or cloning.
Definition: LCEbreed.h:192
bool setFecundity()
Definition: LCEbreed.cc:262
sex_t getOffsprgSexRandom()
Definition: LCEbreed.h:113
bool doInheritance()
Definition: LCEbreed.h:101
bool checkMatingCondition(Patch *thePatch)
Checks if any mating will take place in the patch passed as argument.
Definition: LCEbreed.h:184
bool(LCE_Breed_base::* CheckMatingConditionFuncPtr)(Patch *thePatch)
Definition: LCEbreed.h:61
double getPoissonFecundity(double mean)
Definition: LCEbreed.h:102
sex_t getOffsprgSexFixed()
Definition: LCEbreed.cc:340
unsigned int _mating_males
Definition: LCEbreed.h:48
LCE_Breed_base()
Definition: LCEbreed.cc:44
Individual * partialSelfing(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns the mother pointer or a random female if _mating_proportion != 1.
Definition: LCEbreed.h:336
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:258
sex_t getOffsprgSexCloning()
Definition: LCEbreed.h:116
TMatrix _mean_fecundity
Definition: LCEbreed.h:66
bool checkSelfing(Patch *thePatch)
Checks whether mating will take place in the current patch when mating is selfing.
Definition: LCEbreed.h:216
Individual * fullPolyginy(Patch *thePatch, Individual *mother, unsigned int motherIndex)
Returns a pointer to the alpha male of the patch.
Definition: LCEbreed.h:250
int _mating_system
Definition: LCEbreed.h:47
bool setSexRatio()
Definition: LCEbreed.cc:222
Individual *(LCE_Breed_base::* MatingFuncPtr)(Patch *, Individual *, unsigned int)
Definition: LCEbreed.h:58
double getMeanFecundity(unsigned int patch)
Definition: LCEbreed.h:99
double getFecundity(unsigned int patch)
Definition: LCEbreed.h:110
virtual bool setParameters()
Definition: LCEbreed.cc:75
Implementation of the basic breeding and mating procedures, does not link to any trait.
Definition: LCEbreed.h:374
virtual age_t requiredAgeClass()
Definition: LCEbreed.h:394
virtual bool setParameters()
Definition: LCEbreed.cc:569
virtual void loadFileServices(FileServices *loader)
Definition: LCEbreed.h:389
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: LCEbreed.h:391
virtual void execute()
Definition: LCEbreed.cc:576
virtual LifeCycleEvent * clone()
Definition: LCEbreed.h:387
virtual void loadStatServices(StatServices *loader)
Definition: LCEbreed.h:390
virtual ~LCE_Breed()
Definition: LCEbreed.h:380
LCE_Breed()
Definition: LCEbreed.h:378
virtual age_t removeAgeClass()
Definition: LCEbreed.h:392
virtual age_t addAgeClass()
Definition: LCEbreed.cc:594
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:71
Metapop * _popPtr
The ptr to the current Metapop.
Definition: lifecycleevent.h:79
bool isSet()
Definition: param.h:146
Second class in the metapopulation design structure, between the Metapop and Individual classes.
Definition: metapop.h:430
unsigned int size(age_t AGE)
Returns the size of the container of the appropriate age class(es) for both sexes.
Definition: metapop.h:496
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:532
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:229
static double Gaussian(double sigma)
Definition: Uniform.h:271
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:125
static bool RandBool()
Returns a random boolean.
Definition: Uniform.h:170
static double LogNormal(double zeta, double sigma)
Definition: Uniform.h:367
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:43
virtual Param * get_parameter(std::string name)
Param getter.
Definition: simcomponent.h:137
The Service class used to manage the StatHandler objects.
Definition: statservices.h:48
A class to handle matrix in params, coerces matrix into a vector of same total size.
Definition: tmatrix.h:48
double get(unsigned int i, unsigned int j) const
Accessor to element at row i and column j.
Definition: tmatrix.h:191
sex_t
Sex types, males are always 0 and females 1!!
Definition: types.h:34
@ FEM
Definition: types.h:35
@ MAL
Definition: types.h:35
unsigned int age_t
Age class flags.
Definition: types.h:44
#define ADULTS
Adults age class flag (breeders).
Definition: types.h:52
#define OFFSPRG
Offspring age class flag.
Definition: types.h:48
@ ADLTx
Definition: types.h:40