Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
Evolving dispersal trait, codes for female (_type = FDISP) or male (_type = MDISP) sex-specific dispersal rates. More...
#include <ttdispersal.h>
Public Member Functions | |
TTDispersal (sex_t sex) | |
TTDispersal (const TTDispersal &TP) | |
virtual | ~TTDispersal () |
Setters | |
void | set_mut_rate (double val) |
void | set_mut_mean (double val) |
void | set_init_rate_fem (double val) |
void | set_init_rate_mal (double val) |
void | set_gender (sex_t val) |
void | set_proto (TProtoDispersal *P) |
Implementations | |
virtual void | init () |
virtual void | init_sequence () |
virtual void | reset () |
virtual void | inherit (TTrait *mother, TTrait *father) |
virtual void | mutate () |
virtual trait_t | get_type () const |
virtual void | set_value () |
virtual void * | getValue () const |
virtual void ** | get_sequence () const |
virtual double | get_allele_value (int loc, int all) |
virtual void | set_allele_value (unsigned int locus, unsigned int allele, double value) |
virtual void | set_sequence (void **seq) |
virtual void * | set_trait (void *value) |
virtual void | show_up () |
virtual TTDispersal * | clone () |
virtual TTDispersal & | operator= (const TTrait &TP) |
virtual bool | operator== (const TTrait &TP) |
virtual bool | operator!= (const TTrait &TP) |
virtual void | store_data (BinaryStorageBuffer *saver) |
virtual bool | retrieve_data (BinaryStorageBuffer *reader) |
![]() | |
virtual void | init ()=0 |
Called to allocate the trait's genotypic sequences. More... | |
virtual void | init_sequence ()=0 |
Called at the start of each replicate, sets the initial genotypes. More... | |
virtual void | reset ()=0 |
Called at the end of each simulation/replicate, deallocates sequence memory. More... | |
virtual void | inherit (TTrait *mother, TTrait *father)=0 |
Inheritance procedure, creates a new trait from mother's and father's traits. More... | |
virtual void | mutate ()=0 |
Mutation procedure, perform mutations on the genes sequence. More... | |
virtual void * | set_trait (void *value)=0 |
Called to set the phenotypic to a particular value or to give context-dependant value(s) to the trait. More... | |
virtual void | set_sequence (void **seq)=0 |
Called to set the sequence pointer to an existing trait. More... | |
virtual double | get_allele_value (int loc, int all)=0 |
Called to read one allele value at a particular locus. More... | |
virtual void | set_allele_value (unsigned int locus, unsigned int allele, double value)=0 |
Called to change the allelic value at a particular locus. More... | |
virtual void | set_value ()=0 |
Tells the trait to set its phenotype from genotype, should be used instead of getValue(). More... | |
virtual void * | getValue () const =0 |
Genotype to phenotype mapper. More... | |
virtual trait_t | get_type () const =0 |
type accessor. More... | |
virtual void ** | get_sequence () const =0 |
sequence accessor. More... | |
virtual void | show_up ()=0 |
Writes some info to stdout. More... | |
virtual TTrait * | clone ()=0 |
Returns a copy of itself. More... | |
virtual | ~TTrait () |
![]() | |
virtual void | store_data (BinaryStorageBuffer *saver)=0 |
Interface to store the component data (e.g. gene values) into a binary buffer. More... | |
virtual bool | retrieve_data (BinaryStorageBuffer *reader)=0 |
Interface to retrieve the same data from the binary buffer. More... | |
virtual | ~StorableComponent () |
Private Attributes | |
double | _mut_rate |
The allelic mutation rate. More... | |
double | _mut_mean |
The mean mutation step. More... | |
double | _init_rate_fem |
Initial allele for female dispersal. More... | |
double | _init_rate_mal |
Initial allele for male dispersal. More... | |
TProtoDispersal * | _myProto |
sex_t | _gender |
the gender of the trait, will determine its type. More... | |
double | _sequence [2] |
The trait's type. More... | |
double | _phenotype |
Evolving dispersal trait, codes for female (_type = FDISP) or male (_type = MDISP) sex-specific dispersal rates.
TTDispersal::TTDispersal | ( | sex_t | sex | ) |
sex | determines the type of this trait (FDISP for female dispersal, MDISP for male dispersal) |
References _sequence.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Implements TTrait.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Implements TTrait.
References _phenotype.
Referenced by show_up().
Implements TTrait.
References _sequence, TTrait::get_allele_value(), and RAND::RandBool().
|
inlinevirtual |
|
virtual |
Implements TTrait.
References _gender, _init_rate_fem, _init_rate_mal, _myProto, _sequence, fatal(), FEM, RAND::Gaussian(), TMatrix::get(), TProtoDispersal::get_init_dist(), TProtoDispersal::get_init_dist_params(), TProtoDispersal::get_init_mode(), TMatrix::getNbRows(), and RAND::Uniform().
|
virtual |
Implements TTrait.
References _mut_mean, _mut_rate, _sequence, RAND::Poisson(), RAND::RandBool(), and RAND::Uniform().
|
virtual |
Implements TTrait.
|
virtual |
Implements TTrait.
References _gender, _phenotype, and _sequence.
|
virtual |
|
inlinevirtual |
Implements StorableComponent.
References _sequence, and BinaryStorageBuffer::read().
|
inline |
References _gender.
Referenced by TProtoDispersal::hatch().
|
inline |
References _init_rate_fem.
Referenced by TProtoDispersal::hatch().
|
inline |
References _init_rate_mal.
Referenced by TProtoDispersal::hatch().
|
inline |
References _mut_mean.
Referenced by TProtoDispersal::hatch().
|
inline |
References _mut_rate.
Referenced by TProtoDispersal::hatch().
|
inline |
References _myProto.
Referenced by TProtoDispersal::hatch().
|
inlinevirtual |
Implements TTrait.
|
inlinevirtual |
Implements TTrait.
|
inlinevirtual |
Implements TTrait.
References _phenotype, and _sequence.
Referenced by show_up().
|
virtual |
Implements TTrait.
References _sequence, get_type(), getValue(), message(), and set_value().
|
inlinevirtual |
Implements StorableComponent.
References _sequence, and BinaryStorageBuffer::store().
|
private |
the gender of the trait, will determine its type.
Referenced by get_type(), init_sequence(), operator=(), operator==(), and set_gender().
|
private |
Initial allele for female dispersal.
Referenced by init_sequence(), and set_init_rate_fem().
|
private |
Initial allele for male dispersal.
Referenced by init_sequence(), and set_init_rate_mal().
|
private |
The mean mutation step.
Referenced by mutate(), and set_mut_mean().
|
private |
The allelic mutation rate.
The mutation distribution is exponential, centered on the allelic value.
Referenced by mutate(), and set_mut_rate().
|
private |
Referenced by init_sequence(), and set_proto().
|
private |
Referenced by getValue(), operator=(), and set_value().
|
private |
The trait's type.
One diploid locus coding for a sex-specific dispersal rate.
Referenced by get_allele_value(), inherit(), init(), init_sequence(), mutate(), operator=(), retrieve_data(), set_allele_value(), set_value(), show_up(), store_data(), and TTDispersal().