210 virtual void init ();
212 virtual void reset ();
222 virtual void set_allele_value (
unsigned int locus,
unsigned int allele,
double value);
254 virtual void FHread (
string& filename) {}
A class to store any kind of data in a char buffer before unloading it in a binary data file.
Definition: binarystoragebuffer.h:44
void store(void *stream, unsigned int nb_bytes)
Definition: binarystoragebuffer.cc:16
A class to manage the files associated with each components of the simulation.
Definition: fileservices.h:52
Allelic frequency initialiser for the DBMI trait.
Definition: ttbdmi.h:299
virtual age_t removeAgeClass()
Definition: ttbdmi.h:325
bool setSpatialPattern(TMatrix &freq_mat, unsigned int patchNbr)
Definition: ttbdmi.cc:955
virtual void loadFileServices(FileServices *loader)
Definition: ttbdmi.h:322
TMatrix _init_freq
Definition: ttbdmi.h:301
unsigned int _nLocus
Definition: ttbdmi.h:302
bool setPatchFreq(TMatrix &freq_mat, TMatrix &pat_mat, unsigned int patchNbr)
Definition: ttbdmi.cc:993
virtual age_t requiredAgeClass()
Definition: ttbdmi.h:327
virtual bool setParameters()
Definition: ttbdmi.cc:910
virtual age_t addAgeClass()
Definition: ttbdmi.h:326
void init_value(sex_t SEX, age_idx age, unsigned int size, unsigned int deme)
Definition: ttbdmi.cc:1054
virtual LifeCycleEvent * clone()
Definition: ttbdmi.h:317
virtual void loadStatServices(StatServices *loader)
Definition: ttbdmi.h:323
LCE_Init_BDMI()
Definition: ttbdmi.cc:900
virtual ~LCE_Init_BDMI()
Definition: ttbdmi.h:308
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: ttbdmi.h:324
virtual void execute()
Definition: ttbdmi.cc:1027
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:73
Second class in the metapopulation design structure, between the Metapop and Individual classes.
Definition: metapop.h:430
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:45
The Service class used to manage the StatHandler objects.
Definition: statservices.h:50
A class to handle matrix in params, coerces matrix into a vector of same total size.
Definition: tmatrix.h:49
void set(unsigned int i, unsigned int j, double val)
Sets element at row i and column j to value val.
Definition: tmatrix.h:102
double get(unsigned int i, unsigned int j)
Accessor to element at row i and column j.
Definition: tmatrix.h:147
int get_nb_locus()
Definition: ttbdmi.h:77
virtual TraitPrototype * clone()
Definition: ttbdmi.h:111
bool _isHaploid
Definition: ttbdmi.h:54
double * _init_freq
Definition: ttbdmi.h:59
virtual bool retrieve_data(BinaryStorageBuffer *reader)
Definition: ttbdmi.cc:270
double get_init_freq(unsigned int i)
Definition: ttbdmi.h:81
double getGenoFitnessHaplo(unsigned int row, unsigned int pos)
Definition: ttbdmi.h:84
double _recomb_rate
Definition: ttbdmi.h:58
void(TT_BDMI::* _inherit_func_ptr)(TTrait *, TTrait *)
Definition: ttbdmi.h:63
virtual void loadStatServices(StatServices *loader)
Definition: ttbdmi.cc:168
virtual void store_data(BinaryStorageBuffer *saver)
Definition: ttbdmi.h:115
void inherit(sex_t SEX, bitstring *seq, bitstring **parent)
Definition: ttbdmi.cc:232
double _genomic_mut_rate
Definition: ttbdmi.h:57
TTBDMI_FH * _writer
Definition: ttbdmi.h:69
trait_t _type
Definition: ttbdmi.h:52
virtual void init()
Definition: ttbdmi.h:109
bool isInitSet()
Definition: ttbdmi.h:82
virtual TTrait * hatch()
Definition: ttbdmi.cc:180
double getGenoFitnessDiplo(unsigned int row, unsigned int posA, unsigned int posB)
Definition: ttbdmi.h:89
double _mut_rate
Definition: ttbdmi.h:56
double(TT_BDMI::* _viability_func_ptr)(void)
Definition: ttbdmi.h:65
virtual ~TProtoBDMI()
Definition: ttbdmi.cc:79
bool _isInitSet
Definition: ttbdmi.h:60
TMatrix * _genoTable
Definition: ttbdmi.h:67
void setGenoFitnessValue(unsigned int row, unsigned int geno, double value)
Definition: ttbdmi.h:100
double getGenoFitnessDiplo(unsigned int row, unsigned int pos)
Definition: ttbdmi.h:94
void(TT_BDMI::* _mutation_func_ptr)(void)
Definition: ttbdmi.h:64
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: ttbdmi.h:125
virtual trait_t get_type() const
Definition: ttbdmi.h:112
virtual void loadFileServices(FileServices *loader)
Definition: ttbdmi.cc:137
virtual bool setParameters()
Definition: ttbdmi.cc:88
TProtoBDMI()
Definition: ttbdmi.cc:39
void showGenoTable(unsigned int nrows)
Definition: ttbdmi.cc:212
void set_init_freq(double *val, unsigned int size)
Definition: ttbdmi.cc:197
bool isHaploid()
Definition: ttbdmi.h:79
double get_mut_rate()
Definition: ttbdmi.h:78
TTBDMI_SH * _stater
Definition: ttbdmi.h:68
unsigned int _nb_locus
Definition: ttbdmi.h:55
static unsigned int _diploGenotTableCoding[3][3]
Definition: ttbdmi.h:61
FileHandler for the DBMI trait.
Definition: ttbdmi.h:243
void write_haplo(Patch *patch, sex_t SEX, age_idx AGE, ofstream &FH)
Definition: ttbdmi.cc:634
virtual ~TTBDMI_FH()
Definition: ttbdmi.h:248
TTBDMI_FH(TProtoBDMI *TP)
Definition: ttbdmi.h:247
virtual void FHread(string &filename)
Definition: ttbdmi.h:254
virtual void FHwrite()
Definition: ttbdmi.cc:587
void write_diplo(Patch *patch, sex_t SEX, age_idx AGE, ofstream &FH)
Definition: ttbdmi.cc:655
StatHandler for the DBMI trait.
Definition: ttbdmi.h:266
double getPatchIcmp(unsigned int i)
Definition: ttbdmi.h:288
double * _patchFreq
Definition: ttbdmi.h:269
double * _patchIcmp
Definition: ttbdmi.h:269
virtual bool setStatRecorders(std::string &token)
Definition: ttbdmi.cc:681
virtual ~TTBDMI_SH()
Definition: ttbdmi.h:275
void addStats(age_t AGE)
Definition: ttbdmi.cc:707
TTBDMI_SH(TProtoBDMI *TP)
Definition: ttbdmi.h:272
double _freq
Definition: ttbdmi.h:268
void setAdultStats()
Definition: ttbdmi.cc:732
void countAllele_haplo(Patch *patch, sex_t SEX, age_idx AGE, double **frqTab, double **icpTab)
Definition: ttbdmi.cc:845
void setStats(age_idx agex, void(TTBDMI_SH::*cntFunc)(Patch *, sex_t, age_idx, double **, double **))
Definition: ttbdmi.cc:748
void setOffsprgStats()
Definition: ttbdmi.cc:740
double getFreqIcmp()
Definition: ttbdmi.h:286
double getFreq()
Definition: ttbdmi.h:285
double getPatchFreq(unsigned int i)
Definition: ttbdmi.h:287
void countAllele_diplo(Patch *patch, sex_t SEX, age_idx AGE, double **frqTab, double **icpTab)
Definition: ttbdmi.cc:870
double _freqIcomp
Definition: ttbdmi.h:268
TTProtoWithMap.
Definition: ttrait_with_map.h:176
double _genomic_mut_rate
Definition: ttbdmi.h:146
virtual void set_value()
Definition: ttbdmi.h:217
double _recomb_rate
Definition: ttbdmi.h:147
unsigned int get_num_mut_haplo(unsigned int loc)
Definition: ttbdmi.h:204
void mutate_diplo()
Definition: ttbdmi.cc:469
virtual void inherit(TTrait *mother, TTrait *father)
Definition: ttbdmi.h:213
virtual double get_allele_value(int loc, int all)
Definition: ttbdmi.cc:353
static unsigned int * _recomb_template
Definition: ttbdmi.h:153
bool _isHaploid
Definition: ttbdmi.h:142
virtual void * set_trait(void *value)
Definition: ttbdmi.h:215
void(TT_BDMI::* _inherit_func_ptr)(TTrait *, TTrait *)
Definition: ttbdmi.h:149
virtual void init()
Definition: ttbdmi.cc:372
virtual void reset()
Definition: ttbdmi.cc:383
virtual bool operator==(const TTrait &)
Definition: ttbdmi.cc:329
virtual TT_BDMI * clone()
Definition: ttbdmi.h:225
void inherit_diplo(TTrait *mother, TTrait *father)
Definition: ttbdmi.cc:430
void set_inherit_func_ptr(void(TT_BDMI::*theFunc)(TTrait *, TTrait *))
Definition: ttbdmi.h:181
virtual void mutate()
Definition: ttbdmi.h:214
virtual void show_up()
Definition: ttbdmi.cc:521
void set_nb_locus(int val)
Definition: ttbdmi.h:176
void set_isHaploid(bool val)
Definition: ttbdmi.h:180
virtual bool retrieve_data(BinaryStorageBuffer *reader)
Definition: ttbdmi.cc:562
double viability_diplo()
Definition: ttbdmi.cc:500
virtual trait_t get_type() const
Definition: ttbdmi.h:219
TT_BDMI()
Definition: ttbdmi.h:160
double viability_haplo()
Definition: ttbdmi.cc:485
void set_mut_rate(double val)
Definition: ttbdmi.h:177
void set_recomb_rate(double val)
Definition: ttbdmi.h:179
static unsigned int * _rSites
Definition: ttbdmi.h:153
virtual bool operator!=(const TTrait &)
Definition: ttbdmi.cc:343
virtual void set_sequence(void **seq)
Definition: ttbdmi.h:216
void set_viability_func_ptr(double(TT_BDMI::*theFunc)(void))
Definition: ttbdmi.h:185
virtual void * getValue() const
Definition: ttbdmi.h:218
void set_sequence(bitstring **seq)
Definition: ttbdmi.cc:394
void inherit_haplo(TTrait *mother, TTrait *father)
Definition: ttbdmi.cc:441
bitstring * _sequence[2]
Definition: ttbdmi.h:138
virtual void store_data(BinaryStorageBuffer *saver)
Definition: ttbdmi.cc:546
TProtoBDMI * _myProto
Definition: ttbdmi.h:136
virtual ~TT_BDMI()
Definition: ttbdmi.h:172
static unsigned int _haploGenotCoding[2][2]
Definition: ttbdmi.h:155
void mutate_haplo()
Definition: ttbdmi.cc:453
void set_proto(TProtoBDMI *proto)
Definition: ttbdmi.h:188
double _phenotype
Definition: ttbdmi.h:140
unsigned int get_num_mut_diplo(unsigned int loc)
Definition: ttbdmi.h:205
void set_mutation_func_ptr(void(TT_BDMI::*theFunc)(void))
Definition: ttbdmi.h:183
double _mut_rate
Definition: ttbdmi.h:145
virtual void ** get_sequence() const
Definition: ttbdmi.h:220
void set_geno_rate(double val)
Definition: ttbdmi.h:178
static unsigned char * _sites
Definition: ttbdmi.h:154
virtual void set_allele_value(unsigned int locus, unsigned int allele, double value)
Definition: ttbdmi.cc:365
virtual void init_sequence()
Definition: ttbdmi.cc:403
double(TT_BDMI::* _viability_func_ptr)(void)
Definition: ttbdmi.h:151
TT_BDMI(const TT_BDMI &T)
Definition: ttbdmi.h:165
static unsigned int _diploGenotCoding[2][2]
Definition: ttbdmi.h:156
void(TT_BDMI::* _mutation_func_ptr)(void)
Definition: ttbdmi.h:150
unsigned int _nb_locus
Definition: ttbdmi.h:144
virtual TT_BDMI & operator=(const TTrait &)
Definition: ttbdmi.cc:301
Interface for all trait types, declares all basic trait operations.
Definition: ttrait.h:46
Template class for the trait's FileHandler.
Definition: filehandler.h:217
TTrait setter.
Definition: ttrait.h:125
Template class for the trait's StatHandler.
Definition: stathandler.h:168
Non-template and faster implementation of std::bitset.
Definition: bitstring.h:56
std::string trait_t
Trait types.
Definition: types.h:63
sex_t
Sex types, males are always 0 and females 1!!
Definition: types.h:36
unsigned int age_t
Age class flags.
Definition: types.h:46
age_idx
Array index of the age classes in the patch sizes and containers arrays.
Definition: types.h:41