30#ifndef TTDISPERSALGENE_H
31#define TTDISPERSALGENE_H
99 {assert(allele < 2);
_sequence[allele] = value;}
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 read(void *out, unsigned int nb_bytes)
Definition: binarystoragebuffer.h:162
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
int getTraitIndex(trait_t type)
Gives the index of trait with type.
Definition: indfactory.cc:128
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:45
virtual void init()
Definition: stathandler.cc:39
Metapop * _pop
Link to the current population, set through the link to the StatService.
Definition: stathandler.h:61
A class to compute and store the summary statistics associated with a SimComponent.
Definition: stathandler.h:110
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
Prototype of the evolving dispersal trait, defines the sex-specific trait type.
Definition: ttdispersal.h:119
TTDispersalSH * _stats
The trait's type.
Definition: ttdispersal.h:165
TMatrix * get_init_dist_params()
Definition: ttdispersal.h:143
double _init_rate_mal
Initial allele for male dispersal.
Definition: ttdispersal.h:154
bool get_init_mode()
Definition: ttdispersal.h:142
virtual void loadFileServices(FileServices *loader)
Definition: ttdispersal.h:135
string _init_dist
Definition: ttdispersal.h:156
bool setNonRandom()
Definition: ttdispersal.cc:120
string get_init_dist()
Definition: ttdispersal.h:144
sex_t _gender
The gender of the trait, will determine its type.
Definition: ttdispersal.h:161
virtual void reset()
Definition: ttdispersal.h:126
double _mut_mean
Mean mutation step.
Definition: ttdispersal.h:150
virtual TTDispersal * hatch()
Definition: ttdispersal.cc:190
bool _init_random
Definition: ttdispersal.h:158
virtual TProtoDispersal * clone()
Definition: ttdispersal.h:128
double _init_rate_fem
Initial allele for female dispersal.
Definition: ttdispersal.h:152
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: ttdispersal.h:137
TMatrix _init_dist_param
Definition: ttdispersal.h:157
virtual trait_t get_type() const
Definition: ttdispersal.h:129
virtual bool setParameters()
Definition: ttdispersal.cc:78
virtual void store_data(BinaryStorageBuffer *saver)
Definition: ttdispersal.h:131
bool setRandom()
Definition: ttdispersal.cc:151
virtual void loadStatServices(StatServices *loader)
Definition: ttdispersal.cc:180
virtual ~TProtoDispersal()
Definition: ttdispersal.cc:71
double _mut_rate
The allelic mutation rate.
Definition: ttdispersal.h:148
virtual bool retrieve_data(BinaryStorageBuffer *reader)
Definition: ttdispersal.h:132
virtual void init()
Definition: ttdispersal.h:125
The StatHandler for the evolving dispersal traits.
Definition: ttdispersal.h:174
double getMeanMalDispRate()
Definition: stats_disp.cc:189
virtual ~TTDispersalSH()
Definition: ttdispersal.h:187
int _mdispIdx
Definition: ttdispersal.h:180
int _fdispIdx
Definition: ttdispersal.h:180
double getPatchDisp_AF(unsigned int patch)
Definition: ttdispersal.h:221
double getMeanDispRate()
Definition: stats_disp.cc:56
double getPatchDisp_OF(unsigned int patch)
Definition: ttdispersal.h:211
double _meanOffMalDisp
Definition: ttdispersal.h:178
virtual bool setStatRecorders(std::string &token)
Definition: ttdispersal.cc:358
TProtoDispersal * _trait
Definition: ttdispersal.h:176
void addDispPerPatch(sex_t SEX, age_t AGE)
Definition: ttdispersal.cc:419
double getOffsprgMeanDispRate()
Definition: stats_disp.cc:105
double getmeanOFD()
Definition: ttdispersal.h:199
double _meanMalDisp
Definition: ttdispersal.h:178
double getmeanFD()
Definition: ttdispersal.h:201
double _meanOffFemDisp
Definition: ttdispersal.h:178
double getMeanDispRateInPatch(sex_t SEX, age_idx age, unsigned int traitidx, unsigned int i)
Definition: stats_disp.cc:39
double getMeanFemDispRate()
Definition: stats_disp.cc:170
double getmeanOMD()
Definition: ttdispersal.h:200
virtual void init()
Definition: ttdispersal.h:188
double getPatchDisp_AM(unsigned int patch)
Definition: ttdispersal.h:226
double getPatchDisp_OM(unsigned int patch)
Definition: ttdispersal.h:216
double getmeanMD()
Definition: ttdispersal.h:202
TTDispersalSH(TProtoDispersal *TT)
Definition: ttdispersal.h:184
double _meanFemDisp
Definition: ttdispersal.h:178
Evolving dispersal trait, codes for female (_type = FDISP) or male (_type = MDISP) sex-specific dispe...
Definition: ttdispersal.h:44
void set_mut_mean(double val)
Definition: ttdispersal.h:77
void set_init_rate_fem(double val)
Definition: ttdispersal.h:78
void set_proto(TProtoDispersal *P)
Definition: ttdispersal.h:82
double _mut_mean
The mean mutation step.
Definition: ttdispersal.h:49
virtual ~TTDispersal()
Definition: ttdispersal.h:72
double _phenotype
Definition: ttdispersal.h:63
virtual void ** get_sequence() const
Definition: ttdispersal.h:96
virtual void * set_trait(void *value)
Definition: ttdispersal.h:101
void set_mut_rate(double val)
Definition: ttdispersal.h:76
virtual bool retrieve_data(BinaryStorageBuffer *reader)
Definition: ttdispersal.h:110
virtual void init_sequence()
Definition: ttdispersal.cc:262
virtual TTDispersal * clone()
Definition: ttdispersal.h:103
virtual void reset()
Definition: ttdispersal.h:88
double _mut_rate
The allelic mutation rate.
Definition: ttdispersal.h:47
double _init_rate_fem
Initial allele for female dispersal.
Definition: ttdispersal.h:51
virtual void mutate()
Definition: ttdispersal.cc:317
virtual TTDispersal & operator=(const TTrait &TP)
Definition: ttdispersal.cc:221
double _sequence[2]
The trait's type.
Definition: ttdispersal.h:62
sex_t _gender
the gender of the trait, will determine its type.
Definition: ttdispersal.h:58
virtual void * getValue() const
Definition: ttdispersal.h:94
virtual bool operator==(const TTrait &TP)
Definition: ttdispersal.cc:238
TTDispersal(const TTDispersal &TP)
Definition: ttdispersal.h:68
void set_gender(sex_t val)
Definition: ttdispersal.h:80
virtual trait_t get_type() const
Definition: ttdispersal.h:91
virtual void inherit(TTrait *mother, TTrait *father)
Definition: ttdispersal.cc:306
void set_init_rate_mal(double val)
Definition: ttdispersal.h:79
virtual void set_sequence(void **seq)
Definition: ttdispersal.h:100
virtual void set_value()
Definition: ttdispersal.h:92
double _init_rate_mal
Initial allele for male dispersal.
Definition: ttdispersal.h:53
virtual bool operator!=(const TTrait &TP)
Definition: ttdispersal.cc:252
virtual void store_data(BinaryStorageBuffer *saver)
Definition: ttdispersal.h:109
virtual double get_allele_value(int loc, int all)
Definition: ttdispersal.h:97
TProtoDispersal * _myProto
Definition: ttdispersal.h:55
virtual void init()
Definition: ttdispersal.h:86
virtual void show_up()
Definition: ttdispersal.cc:342
virtual void set_allele_value(unsigned int locus, unsigned int allele, double value)
Definition: ttdispersal.h:98
Interface for all trait types, declares all basic trait operations.
Definition: ttrait.h:46
TTrait setter.
Definition: ttrait.h:125
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
@ FEM
Definition: types.h:37
@ MAL
Definition: types.h:37
#define MDISP
Definition: types.h:69
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
@ OFFSx
Definition: types.h:42
@ ADLTx
Definition: types.h:42
#define FDISP
Definition: types.h:68