Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
#include <ttbdmi.h>
Public Member Functions | |
TT_BDMI () | |
TT_BDMI (const TT_BDMI &T) | |
virtual | ~TT_BDMI () |
void | set_sequence (bitstring **seq) |
void | inherit_haplo (TTrait *mother, TTrait *father) |
void | inherit_diplo (TTrait *mother, TTrait *father) |
void | mutate_haplo () |
void | mutate_diplo () |
double | viability_haplo () |
double | viability_diplo () |
unsigned int | get_num_mut_haplo (unsigned int loc) |
unsigned int | get_num_mut_diplo (unsigned int loc) |
Setters: | |
void | set_nb_locus (int val) |
void | set_mut_rate (double val) |
void | set_geno_rate (double val) |
void | set_recomb_rate (double val) |
void | set_isHaploid (bool val) |
void | set_inherit_func_ptr (void(TT_BDMI::*theFunc)(TTrait *, TTrait *)) |
void | set_mutation_func_ptr (void(TT_BDMI::*theFunc)(void)) |
void | set_viability_func_ptr (double(TT_BDMI::*theFunc)(void)) |
void | set_proto (TProtoBDMI *proto) |
Implementations | |
virtual void | init () |
virtual void | init_sequence () |
virtual void | reset () |
virtual void | inherit (TTrait *mother, TTrait *father) |
virtual void | mutate () |
virtual void * | set_trait (void *value) |
virtual void | set_sequence (void **seq) |
virtual void | set_value () |
virtual void * | getValue () const |
virtual trait_t | get_type () 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 | show_up () |
virtual TT_BDMI * | clone () |
virtual TT_BDMI & | operator= (const TTrait &) |
virtual bool | operator== (const TTrait &) |
virtual bool | operator!= (const TTrait &) |
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 | |
TProtoBDMI * | _myProto |
bitstring * | _sequence [2] |
double | _phenotype |
bool | _isHaploid |
unsigned int | _nb_locus |
double | _mut_rate |
double | _genomic_mut_rate |
double | _recomb_rate |
void(TT_BDMI::* | _inherit_func_ptr )(TTrait *, TTrait *) |
void(TT_BDMI::* | _mutation_func_ptr )(void) |
double(TT_BDMI::* | _viability_func_ptr )(void) |
Static Private Attributes | |
static unsigned int * | _recomb_template |
static unsigned int * | _rSites |
static unsigned char * | _sites |
static unsigned int | _haploGenotCoding [2][2] = {{0,1},{2,3}} |
static unsigned int | _diploGenotCoding [2][2] = {{0,1},{1,2}} |
|
inline |
|
inlinevirtual |
Implements TTrait.
References _isHaploid, _myProto, TProtoBDMI::getGenoFitnessDiplo(), and TProtoBDMI::getGenoFitnessHaplo().
References _sequence.
Referenced by TTBDMI_SH::countAllele_diplo().
References _sequence.
Referenced by TTBDMI_SH::countAllele_haplo().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Implements TTrait.
References _phenotype.
Referenced by show_up().
References _myProto, _sequence, FEM, TTrait::get_sequence(), TProtoBDMI::inherit(), and MAL.
Referenced by TProtoBDMI::setParameters().
References _myProto, _sequence, TTrait::get_sequence(), TProtoBDMI::inherit(), and MAL.
Referenced by TProtoBDMI::setParameters().
|
virtual |
Implements TTrait.
References _isHaploid, _nb_locus, _sequence, and fatal().
Referenced by operator=(), and set_sequence().
|
virtual |
Implements TTrait.
References _isHaploid, _myProto, _nb_locus, _sequence, TProtoBDMI::get_init_freq(), TProtoBDMI::isInitSet(), bitstring::reset(), bitstring::set(), and RAND::Uniform().
Referenced by LCE_Init_BDMI::init_value().
|
inlinevirtual |
void TT_BDMI::mutate_diplo | ( | ) |
References _genomic_mut_rate, _nb_locus, _sequence, bitstring::flip(), RAND::Poisson(), RAND::RandBool(), and RAND::Uniform().
Referenced by TProtoBDMI::setParameters().
void TT_BDMI::mutate_haplo | ( | ) |
References _genomic_mut_rate, _nb_locus, _sequence, bitstring::flip(), RAND::Poisson(), and RAND::Uniform().
Referenced by TProtoBDMI::setParameters().
|
virtual |
Implements TTrait.
Implements TTrait.
References _isHaploid, _nb_locus, _sequence, bitstring::copy(), init(), reset(), and set_value().
|
virtual |
Implements TTrait.
References _isHaploid, _myProto, _nb_locus, TProtoBDMI::get_type(), and TTrait::get_type().
|
virtual |
Implements TTrait.
References _isHaploid, and _sequence.
Referenced by operator=(), and set_sequence().
|
virtual |
Implements StorableComponent.
References _isHaploid, _sequence, bitstring::nb_words(), BinaryStorageBuffer::read(), and bitstring::set_data().
Implements TTrait.
References _myProto, and TProtoBDMI::setGenoFitnessValue().
|
inline |
References _genomic_mut_rate.
Referenced by TProtoBDMI::hatch().
References _inherit_func_ptr.
Referenced by TProtoBDMI::hatch().
|
inline |
References _isHaploid.
Referenced by TProtoBDMI::hatch().
|
inline |
References _mut_rate.
Referenced by TProtoBDMI::hatch().
|
inline |
References _mutation_func_ptr.
Referenced by TProtoBDMI::hatch().
|
inline |
References _nb_locus.
Referenced by TProtoBDMI::hatch().
|
inline |
References _myProto.
Referenced by TProtoBDMI::hatch().
|
inline |
References _recomb_rate.
void TT_BDMI::set_sequence | ( | bitstring ** | seq | ) |
References _isHaploid, _sequence, bitstring::copy(), init(), and reset().
|
inlinevirtual |
Implements TTrait.
|
inlinevirtual |
Implements TTrait.
|
inlinevirtual |
Implements TTrait.
References _phenotype, and _viability_func_ptr.
Referenced by LCE_Init_BDMI::init_value(), operator=(), and show_up().
|
inline |
References _viability_func_ptr.
Referenced by TProtoBDMI::hatch().
|
virtual |
Implements TTrait.
References _isHaploid, _myProto, _nb_locus, _sequence, getValue(), set_value(), and TProtoBDMI::showGenoTable().
|
virtual |
Implements StorableComponent.
References _isHaploid, _sequence, bitstring::getword_atIdx(), bitstring::nb_words(), and BinaryStorageBuffer::store().
double TT_BDMI::viability_diplo | ( | ) |
References _diploGenotCoding, _myProto, _nb_locus, _sequence, and TProtoBDMI::getGenoFitnessDiplo().
Referenced by TProtoBDMI::setParameters().
double TT_BDMI::viability_haplo | ( | ) |
References _haploGenotCoding, _myProto, _nb_locus, _sequence, and TProtoBDMI::getGenoFitnessHaplo().
Referenced by TProtoBDMI::setParameters().
|
staticprivate |
Referenced by viability_diplo().
|
private |
Referenced by mutate_diplo(), mutate_haplo(), and set_geno_rate().
|
staticprivate |
Referenced by viability_haplo().
Referenced by inherit(), and set_inherit_func_ptr().
|
private |
Referenced by get_allele_value(), init(), init_sequence(), operator=(), operator==(), reset(), retrieve_data(), set_isHaploid(), set_sequence(), show_up(), and store_data().
|
private |
Referenced by set_mut_rate().
|
private |
Referenced by mutate(), and set_mutation_func_ptr().
|
private |
|
private |
Referenced by init(), init_sequence(), mutate_diplo(), mutate_haplo(), operator=(), operator==(), set_nb_locus(), show_up(), viability_diplo(), and viability_haplo().
|
private |
Referenced by getValue(), and set_value().
|
private |
Referenced by set_recomb_rate().
|
staticprivate |
|
staticprivate |
|
private |
|
staticprivate |
|
private |
Referenced by set_value(), and set_viability_func_ptr().