Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
#include <ttquanti.h>
Public Member Functions | |
TTQuantiSH (TProtoQuanti *TP) | |
virtual | ~TTQuantiSH () |
void | resetPtrs () |
virtual void | init () |
virtual bool | setStatRecorders (std::string &token) |
void | addQuanti (age_t AGE) |
void | addEigen (age_t AGE) |
void | addEigenValues (age_t AGE) |
void | addEigenVect1 (age_t AGE) |
void | addQuantiPerPatch (age_t AGE) |
void | addAvgPerPatch (age_t AGE) |
void | addVarPerPatch (age_t AGE) |
void | addCovarPerPatch (age_t AGE) |
void | addEigenPerPatch (age_t AGE) |
void | addEigenValuesPerPatch (age_t AGE) |
void | addEigenVect1PerPatch (age_t AGE) |
void | addEigenStatsPerPatcg (age_t AGE) |
void | addSkewPerPatch (age_t AGE) |
void | setDataTables (age_t AGE) |
void | setAdultStats () |
void | setOffsprgStats () |
void | setStats (age_t AGE) |
double | getMeanPhenot (unsigned int i) |
double | getVa (unsigned int i) |
double | getVg (unsigned int i) |
double | getVb (unsigned int i) |
double | getVp (unsigned int i) |
double | getQst (unsigned int i) |
double | getCovar (unsigned int i) |
double | getEigenValue (unsigned int i) |
double | getEigenVectorElt (unsigned int t1, unsigned int t2) |
double | getMeanPhenotPerPatch (unsigned int i, unsigned int p) |
double | getVaPerPatch (unsigned int i, unsigned int p) |
double | getVpPerPatch (unsigned int i, unsigned int p) |
double | getEigenValuePerPatch (unsigned int i, unsigned int p) |
double | getCovarPerPatch (unsigned int p, unsigned int i) |
double | getEigenVectorEltPerPatch (unsigned int p, unsigned int v) |
double | getSkewPerPatch (unsigned int i, unsigned int p) |
vector< double > | getSNPalleleFreqInPatch (Patch *patch) |
vector< double > | getVaWithDominance (Patch *curPop, const age_idx AGE) |
computation of the additive genetic variance from the average excess of each allele exact under random mating only More... | |
vector< double > | getVaNoDominance (Patch *curPop, const age_idx AGE) |
![]() | |
TraitStatHandler (TProtoQuanti *trait_proto) | |
virtual | ~TraitStatHandler () |
![]() | |
StatHandler () | |
virtual | ~StatHandler () |
virtual void | clear () |
Empties the _recorders list, they are destroyed in StatHandlerBase::reset(). More... | |
virtual StatRecorder< SH > * | 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 | 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 * | _meanP |
double * | _meanG |
double * | _Va |
double * | _Vg |
double * | _Vb |
double * | _Vp |
double * | _covar |
double * | _eigval |
double ** | _eigvect |
double ** | _pmeanP |
double ** | _pmeanG |
double ** | _pVa |
double ** | _pVp |
double ** | _pcovar |
double ** | _peigval |
double ** | _peigvect |
unsigned int | _nb_locus |
unsigned int | _nb_trait |
unsigned int | _patchNbr |
bool | _eVar |
gsl_matrix * | _G |
gsl_matrix * | _evec |
gsl_vector * | _eval |
gsl_eigen_symmv_workspace * | _ws |
DataTable< double > | _phenoTable |
DataTable< double > | _genoTable |
unsigned int | _table_set_gen |
unsigned int | _table_set_age |
unsigned int | _table_set_repl |
Additional Inherited Members | |
![]() | |
typedef std::list< StatRecorder< SH > * >::iterator | REC_IT |
![]() | |
TProtoQuanti * | _SHLinkedTrait |
Pointer to a TraitProtoype object. More... | |
int | _SHLinkedTraitIndex |
Index of the trait in the Individual::Traits table. More... | |
![]() | |
std::list< StatRecorder< SH > * > | _recorders |
The list of stat recorders. More... | |
![]() | |
Metapop * | _pop |
Link to the current population, set through the link to the StatService. More... | |
|
inline |
|
inlinevirtual |
References resetPtrs().
void TTQuantiSH::addAvgPerPatch | ( | age_t | AGE | ) |
References _nb_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), addAvgPerPatch(), ADULTS, ALL, getMeanPhenotPerPatch(), Metapop::getPatchNbr(), tstring::int2str(), OFFSPRG, setAdultStats(), and setOffsprgStats().
Referenced by addAvgPerPatch(), addQuantiPerPatch(), and setStatRecorders().
void TTQuantiSH::addCovarPerPatch | ( | age_t | AGE | ) |
References _nb_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), addCovarPerPatch(), ADULTS, ALL, getCovarPerPatch(), Metapop::getPatchNbr(), tstring::int2str(), OFFSPRG, setAdultStats(), and setOffsprgStats().
Referenced by addCovarPerPatch(), addQuantiPerPatch(), and setStatRecorders().
void TTQuantiSH::addEigen | ( | age_t | AGE | ) |
References _nb_trait, StatHandler< SH >::add(), addEigen(), ADULTS, ALL, getEigenValue(), getEigenVectorElt(), tstring::int2str(), OFFSPRG, setAdultStats(), setOffsprgStats(), and warning().
Referenced by addEigen(), addEigenValues(), addEigenVect1(), and setStatRecorders().
void TTQuantiSH::addEigenPerPatch | ( | age_t | AGE | ) |
References _nb_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), addEigenPerPatch(), ADULTS, ALL, getEigenValuePerPatch(), getEigenVectorEltPerPatch(), Metapop::getPatchNbr(), tstring::int2str(), OFFSPRG, setAdultStats(), setOffsprgStats(), and warning().
Referenced by addEigenPerPatch(), addEigenValuesPerPatch(), addEigenVect1PerPatch(), and setStatRecorders().
void TTQuantiSH::addEigenStatsPerPatcg | ( | age_t | AGE | ) |
void TTQuantiSH::addEigenValues | ( | age_t | AGE | ) |
References _nb_trait, StatHandler< SH >::add(), addEigen(), ADULTS, ALL, getEigenValue(), tstring::int2str(), OFFSPRG, setAdultStats(), setOffsprgStats(), and warning().
Referenced by setStatRecorders().
void TTQuantiSH::addEigenValuesPerPatch | ( | age_t | AGE | ) |
References _nb_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), addEigenPerPatch(), ADULTS, ALL, getEigenValuePerPatch(), Metapop::getPatchNbr(), tstring::int2str(), OFFSPRG, setAdultStats(), setOffsprgStats(), and warning().
Referenced by setStatRecorders().
void TTQuantiSH::addEigenVect1 | ( | age_t | AGE | ) |
References _nb_trait, StatHandler< SH >::add(), addEigen(), ADULTS, ALL, getEigenVectorElt(), tstring::int2str(), OFFSPRG, setAdultStats(), setOffsprgStats(), and warning().
Referenced by setStatRecorders().
void TTQuantiSH::addEigenVect1PerPatch | ( | age_t | AGE | ) |
References _nb_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), addEigenPerPatch(), ADULTS, ALL, getEigenVectorEltPerPatch(), Metapop::getPatchNbr(), tstring::int2str(), OFFSPRG, setAdultStats(), setOffsprgStats(), and warning().
Referenced by setStatRecorders().
void TTQuantiSH::addQuanti | ( | age_t | AGE | ) |
References _eVar, _nb_trait, StatHandlerBase::_pop, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTrait, StatHandler< SH >::add(), addQuanti(), ADULTS, ALL, TProtoQuanti::get_dominance_model(), getCovar(), getMeanPhenot(), Metapop::getPatchNbr(), getQst(), getVa(), getVb(), getVp(), tstring::int2str(), OFFSPRG, setAdultStats(), and setOffsprgStats().
Referenced by addQuanti(), and setStatRecorders().
void TTQuantiSH::addQuantiPerPatch | ( | age_t | AGE | ) |
References addAvgPerPatch(), addCovarPerPatch(), addQuantiPerPatch(), addVarPerPatch(), ADULTS, ALL, and OFFSPRG.
Referenced by addQuantiPerPatch(), and setStatRecorders().
void TTQuantiSH::addSkewPerPatch | ( | age_t | AGE | ) |
References _nb_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), addSkewPerPatch(), ADULTS, ALL, Metapop::getPatchNbr(), getSkewPerPatch(), tstring::int2str(), OFFSPRG, setAdultStats(), and setOffsprgStats().
Referenced by addSkewPerPatch(), and setStatRecorders().
void TTQuantiSH::addVarPerPatch | ( | age_t | AGE | ) |
References _eVar, _nb_trait, StatHandlerBase::_pop, StatHandler< SH >::add(), addVarPerPatch(), ADULTS, ALL, Metapop::getPatchNbr(), getVaPerPatch(), getVpPerPatch(), tstring::int2str(), OFFSPRG, setAdultStats(), and setOffsprgStats().
Referenced by addQuantiPerPatch(), addVarPerPatch(), and setStatRecorders().
|
inline |
|
inline |
References _eigval.
Referenced by addEigen(), and addEigenValues().
References _peigval.
Referenced by addEigenPerPatch(), and addEigenValuesPerPatch().
References _eigvect.
Referenced by addEigen(), and addEigenVect1().
References _peigvect.
Referenced by addEigenPerPatch(), and addEigenVect1PerPatch().
|
inline |
|
inline |
References _phenoTable, _pmeanP, DataTable< T >::getClassWithinGroup(), and DataTable< T >::size().
Referenced by addSkewPerPatch().
vector< double > TTQuantiSH::getSNPalleleFreqInPatch | ( | Patch * | patch | ) |
References TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTrait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTraitIndex, ADLTx, fatal(), FEM, Patch::get(), TProtoQuanti::get_allele_values(), TProtoQuanti::get_nb_locus(), TProtoQuanti::get_nb_traits(), TTrait::get_sequence(), Individual::getTrait(), MAL, and Patch::size().
Referenced by getVaNoDominance(), and getVaWithDominance().
|
inline |
CYCLE THROUGH ALL TRAITS
References _nb_locus, _nb_trait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTrait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTraitIndex, _Vg, FEM, Patch::get(), TTQuanti::get_additive_genotype(), TProtoQuanti::get_allele_values(), getSNPalleleFreqInPatch(), Individual::getTrait(), MAL, message(), my_variance_with_fixed_mean(), and Patch::size().
Referenced by LCE_QuantiModifier::setParameters(), and LCE_Breed_Quanti::setParameters().
computation of the additive genetic variance from the average excess of each allele exact under random mating only
CYCLE THROUGH ALL TRAITS
References _nb_locus, _nb_trait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTrait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTraitIndex, _Vg, FEM, Patch::get(), TProtoQuanti::get_allele_values(), TProtoQuanti::get_dominance(), TTQuanti::get_full_genotype(), TProtoQuanti::get_genotype(), TProtoQuanti::get_h2_isBroad(), TTQuanti::get_sequence(), Patch::getID(), getSNPalleleFreqInPatch(), Individual::getTrait(), MAL, message(), my_variance_with_fixed_mean(), and Patch::size().
Referenced by LCE_QuantiModifier::setParameters(), and LCE_Breed_Quanti::setParameters().
|
inline |
|
inline |
References _Vg.
Referenced by LCE_QuantiModifier::setVefromVa().
|
inline |
|
virtual |
Reimplemented from StatHandlerBase.
References _covar, _eigval, _eigvect, _eval, _eVar, _evec, _G, _meanG, _meanP, _nb_locus, _nb_trait, _patchNbr, _pcovar, _peigval, _peigvect, _pmeanG, _pmeanP, StatHandlerBase::_pop, _pVa, _pVp, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTrait, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTraitIndex, _Va, _Vb, _Vg, _Vp, _ws, TProtoQuanti::get_env_var(), TProtoQuanti::get_heritability(), TProtoQuanti::get_nb_locus(), TProtoQuanti::get_nb_traits(), TProtoQuanti::get_type(), Metapop::getPatchNbr(), IndFactory::getTraitIndex(), StatHandlerBase::init(), and resetPtrs().
void TTQuantiSH::resetPtrs | ( | ) |
References _covar, _eigval, _eigvect, _eval, _evec, _G, _meanG, _meanP, _nb_trait, _patchNbr, _pcovar, _peigval, _peigvect, _pmeanG, _pmeanP, _pVa, _pVp, _Va, _Vb, _Vg, _Vp, and _ws.
Referenced by init(), and ~TTQuantiSH().
|
inline |
References ADULTS, and setStats().
Referenced by addAvgPerPatch(), addCovarPerPatch(), addEigen(), addEigenPerPatch(), addEigenValues(), addEigenValuesPerPatch(), addEigenVect1(), addEigenVect1PerPatch(), addQuanti(), addSkewPerPatch(), and addVarPerPatch().
void TTQuantiSH::setDataTables | ( | age_t | AGE | ) |
References _genoTable, _nb_trait, _phenoTable, StatHandlerBase::_pop, TraitStatHandler< TProtoQuanti, TTQuantiSH >::_SHLinkedTraitIndex, ADLTx, ADULTS, fatal(), FEM, Metapop::getPatch(), Metapop::getPatchNbr(), MAL, OFFSx, Metapop::size(), Patch::size(), DataTable< T >::size(), store_quanti_trait_values(), and DataTable< T >::update().
Referenced by setStats().
|
inline |
References OFFSPRG, and setStats().
Referenced by addAvgPerPatch(), addCovarPerPatch(), addEigen(), addEigenPerPatch(), addEigenValues(), addEigenValuesPerPatch(), addEigenVect1(), addEigenVect1PerPatch(), addQuanti(), addSkewPerPatch(), and addVarPerPatch().
|
virtual |
Implements StatHandlerBase.
References addAvgPerPatch(), addCovarPerPatch(), addEigen(), addEigenPerPatch(), addEigenValues(), addEigenValuesPerPatch(), addEigenVect1(), addEigenVect1PerPatch(), addQuanti(), addQuantiPerPatch(), addSkewPerPatch(), addVarPerPatch(), ADULTS, ALL, message(), and OFFSPRG.
void TTQuantiSH::setStats | ( | age_t | AGE | ) |
References _covar, _eigval, _eigvect, _eval, _evec, _G, _genoTable, _meanG, _meanP, _nb_trait, _patchNbr, _pcovar, _peigval, _peigvect, _phenoTable, _pmeanG, _pmeanP, StatHandlerBase::_pop, _pVa, _pVp, _table_set_age, _table_set_gen, _table_set_repl, _Va, _Vb, _Vp, _ws, fatal(), DataTable< T >::getClassWithinGroup(), Metapop::getCurrentGeneration(), Metapop::getCurrentReplicate(), DataTable< T >::getGroup(), Metapop::getPatchNbr(), my_covariance_no_nan(), my_mean(), my_mean_no_nan(), my_variance_with_fixed_mean(), my_variance_with_fixed_mean_no_nan(), setDataTables(), Metapop::size(), and warning().
Referenced by setAdultStats(), and setOffsprgStats().
|
private |
Referenced by getCovar(), init(), resetPtrs(), and setStats().
|
private |
Referenced by getEigenValue(), init(), resetPtrs(), and setStats().
|
private |
Referenced by getEigenVectorElt(), init(), resetPtrs(), and setStats().
|
private |
Referenced by init(), resetPtrs(), and setStats().
|
private |
Referenced by addQuanti(), addVarPerPatch(), and init().
|
private |
Referenced by init(), resetPtrs(), and setStats().
|
private |
Referenced by init(), resetPtrs(), and setStats().
|
private |
Referenced by setDataTables(), and setStats().
|
private |
Referenced by init(), resetPtrs(), and setStats().
|
private |
Referenced by getMeanPhenot(), init(), resetPtrs(), and setStats().
|
private |
Referenced by getVaNoDominance(), getVaWithDominance(), and init().
|
private |
Referenced by addAvgPerPatch(), addCovarPerPatch(), addEigen(), addEigenPerPatch(), addEigenValues(), addEigenValuesPerPatch(), addEigenVect1(), addEigenVect1PerPatch(), addQuanti(), addSkewPerPatch(), addVarPerPatch(), getVaNoDominance(), getVaWithDominance(), init(), resetPtrs(), setDataTables(), and setStats().
|
private |
Referenced by init(), resetPtrs(), and setStats().
|
private |
Referenced by getCovarPerPatch(), init(), resetPtrs(), and setStats().
|
private |
Referenced by getEigenValuePerPatch(), init(), resetPtrs(), and setStats().
|
private |
Referenced by getEigenVectorEltPerPatch(), init(), resetPtrs(), and setStats().
|
private |
Referenced by getSkewPerPatch(), setDataTables(), and setStats().
|
private |
Referenced by init(), resetPtrs(), and setStats().
|
private |
Referenced by getMeanPhenotPerPatch(), getSkewPerPatch(), init(), resetPtrs(), and setStats().
|
private |
Referenced by getVaPerPatch(), init(), resetPtrs(), and setStats().
|
private |
Referenced by getVpPerPatch(), init(), resetPtrs(), and setStats().
|
private |
Referenced by setStats().
|
private |
Referenced by setStats().
|
private |
Referenced by setStats().
|
private |
Referenced by getQst(), getVa(), init(), resetPtrs(), and setStats().
|
private |
Referenced by getQst(), getVb(), init(), resetPtrs(), and setStats().
|
private |
Referenced by getVaNoDominance(), getVaWithDominance(), getVg(), init(), and resetPtrs().
|
private |
Referenced by getVp(), init(), resetPtrs(), and setStats().
|
private |
Referenced by init(), resetPtrs(), and setStats().