Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
A class to perform crosses within patches, implements the NC1 mating design. More...
#include <LCEmisc.h>
Public Member Functions | |
LCE_Cross () | |
virtual | ~LCE_Cross () |
void | sampleAmongPop (Patch *patch, deque< Individual * > &males, unsigned int nsire) |
void | sampleWithinPop (Patch *patch, deque< Individual * > &males, deque< Individual * > &females, unsigned int nsire) |
void | generatePedigree () |
bool | create_individual_ancestors (Individual *ind) |
virtual bool | setParameters () |
virtual void | execute () |
virtual LifeCycleEvent * | clone () |
virtual void | loadFileServices (FileServices *loader) |
virtual void | loadStatServices (StatServices *loader) |
virtual bool | resetParameterFromSource (std::string param, SimComponent *cmpt) |
virtual age_t | removeAgeClass () |
virtual age_t | addAgeClass () |
virtual age_t | requiredAgeClass () |
![]() | |
LifeCycleEvent (const char *name, const char *trait_link) | |
Cstor. More... | |
virtual | ~LifeCycleEvent () |
virtual void | init (Metapop *popPtr) |
Sets the pointer to the current Metapop and the trait link if applicable. More... | |
virtual bool | attach_trait (string trait) |
virtual void | set_paramset (std::string name, bool required, SimComponent *owner) |
virtual void | set_event_name (std::string &name) |
Set the name of the event (name of the ParamSet) and add the corresponding parameter to the set. More... | |
virtual void | set_event_name (const char *name) |
virtual string & | get_event_name () |
Accessor to the LCE's name. More... | |
virtual int | get_rank () |
Accessor to the LCE rank in the life cycle. More... | |
virtual void | set_pop_ptr (Metapop *popPtr) |
Accessors for the population pointer. More... | |
virtual Metapop * | get_pop_ptr () |
![]() | |
SimComponent () | |
virtual | ~SimComponent () |
virtual void | loadUpdaters (UpdaterServices *loader) |
Loads the parameters and component updater onto the updater manager. More... | |
virtual void | set_paramset (ParamSet *paramset) |
Sets the ParamSet member. More... | |
virtual void | set_paramsetFromCopy (const ParamSet &PSet) |
Reset the set of parameters from a another set. More... | |
virtual ParamSet * | get_paramset () |
ParamSet accessor. More... | |
virtual void | add_parameter (Param *param) |
Interface to add a parameter to the set. More... | |
virtual void | add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd) |
Interface to add a parameter to the set. More... | |
virtual void | add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd, ParamUpdaterBase *updater) |
Interface to add a parameter and its updater to the set. More... | |
virtual Param * | get_parameter (std::string name) |
Param getter. More... | |
virtual double | get_parameter_value (std::string name) |
Param value getter. More... | |
virtual string | get_name () |
Returnd the name of the ParamSet, i.e. More... | |
virtual bool | has_parameter (std::string name) |
Param getter. More... | |
Private Attributes | |
unsigned int | _nSire |
unsigned int | _nDam |
unsigned int | _nOffspring |
unsigned int | _atGeneration |
bool | _doAmongPop |
bool | _doWithinPop |
bool | _doReplace |
FHPedigreeReader * | _reader |
string | _pedigree_file |
map< unsigned long, Individual * > | _pedigree_pop |
Additional Inherited Members | |
![]() | |
std::string | _event_name |
The param name to be read in the init file. More... | |
Metapop * | _popPtr |
The ptr to the current Metapop. More... | |
std::string | _LCELinkedTraitType |
The name of the linked trait. More... | |
int | _LCELinkedTraitIndex |
The index in the individual's trait table of the linked trait. More... | |
![]() | |
ParamSet * | _paramSet |
The parameters container. More... | |
A class to perform crosses within patches, implements the NC1 mating design.
LCE_Cross::LCE_Cross | ( | ) |
References SimComponent::add_parameter(), BOOL, INT, setParameters(), and STR.
Referenced by clone().
|
inlinevirtual |
|
inlinevirtual |
Implements LifeCycleEvent.
References OFFSPRG.
|
inlinevirtual |
bool LCE_Cross::create_individual_ancestors | ( | Individual * | ind | ) |
References _pedigree_pop, LifeCycleEvent::_popPtr, ADLTx, Individual::create(), Individual::create_first_gen(), create_individual_ancestors(), FEM, Metapop::get(), Individual::getFather(), Individual::getFatherID(), Individual::getID(), Individual::getMother(), Individual::getMotherID(), IndFactory::makeNewIndividual(), MAL, Individual::setFather(), Individual::setFatherID(), Individual::setMother(), Individual::setMotherID(), Metapop::size(), and RAND::Uniform().
Referenced by create_individual_ancestors(), and generatePedigree().
|
virtual |
Implements LifeCycleEvent.
References _atGeneration, _doAmongPop, _doWithinPop, _nSire, LifeCycleEvent::_popPtr, ADLTx, FEM, Metapop::flush(), generatePedigree(), SimComponent::get_parameter(), Patch::getCopy(), Metapop::getCurrentGeneration(), Metapop::getPatch(), Metapop::getPatchNbr(), MAL, message(), OFFSPRG, sampleAmongPop(), sampleWithinPop(), Metapop::size(), Patch::size(), and warning().
void LCE_Cross::generatePedigree | ( | ) |
References _pedigree_file, _pedigree_pop, LifeCycleEvent::_popPtr, _reader, Patch::add(), create_individual_ancestors(), error(), FEM, FHPedigreeReader::FHread(), Metapop::flush(), Metapop::getCurrentReplicate(), Metapop::getPatch(), FHPedigreeReader::getPedigree(), IndFactory::getPrototypeClone(), Individual::init(), OFFSPRG, OFFSx, Metapop::setCurrentAge(), Individual::setFatherID(), Individual::setID(), Individual::setMotherID(), and warning().
Referenced by execute().
|
virtual |
Implements SimComponent.
References _atGeneration, _pedigree_file, _reader, FileServices::attach_reader(), SimComponent::get_parameter(), Param::getArg(), EventFileHandler< LCE >::set(), and FileHandler::set_isInputHandler().
|
inlinevirtual |
Implements SimComponent.
|
inlinevirtual |
Implements LifeCycleEvent.
|
inlinevirtual |
Implements LifeCycleEvent.
References ADULTS.
|
inlinevirtual |
Implements SimComponent.
void LCE_Cross::sampleAmongPop | ( | Patch * | patch, |
deque< Individual * > & | males, | ||
unsigned int | nsire | ||
) |
References _doReplace, _nDam, _nOffspring, LifeCycleEvent::_popPtr, Patch::add(), ADLTx, ADULTS, FEM, Patch::get(), Patch::getID(), Metapop::getPatchNbr(), Metapop::getPatchPtr(), IndFactory::makeOffsprg(), OFFSx, Patch::size(), and RAND::Uniform().
Referenced by execute().
void LCE_Cross::sampleWithinPop | ( | Patch * | patch, |
deque< Individual * > & | males, | ||
deque< Individual * > & | females, | ||
unsigned int | nsire | ||
) |
References _doReplace, _nDam, _nOffspring, LifeCycleEvent::_popPtr, Patch::add(), ADLTx, FEM, Patch::getID(), IndFactory::makeOffsprg(), OFFSx, Patch::size(), RAND::Uniform(), and warning().
Referenced by execute().
|
virtual |
Implements SimComponent.
References _atGeneration, _doAmongPop, _doReplace, _doWithinPop, _nDam, _nOffspring, _nSire, SimComponent::get_parameter(), SimComponent::get_parameter_value(), Param::getArg(), Param::isSet(), and tstring::str2int().
Referenced by LCE_Cross().
|
private |
Referenced by execute(), loadFileServices(), and setParameters().
|
private |
Referenced by execute(), and setParameters().
|
private |
Referenced by sampleAmongPop(), sampleWithinPop(), and setParameters().
|
private |
Referenced by execute(), and setParameters().
|
private |
Referenced by sampleAmongPop(), sampleWithinPop(), and setParameters().
|
private |
Referenced by sampleAmongPop(), sampleWithinPop(), and setParameters().
|
private |
Referenced by execute(), and setParameters().
|
private |
Referenced by generatePedigree(), and loadFileServices().
|
private |
Referenced by create_individual_ancestors(), and generatePedigree().
|
private |
Referenced by generatePedigree(), and loadFileServices().