96 unsigned char dummy =
static_cast<unsigned char>(
_is_infected);
97 saver->
store(&dummy, 1);
102 reader->
read(&dummy, 1);
243 map< unsigned int, unsigned int >
_times;
255 void record (
unsigned int repl,
unsigned int gen,
double infection);
259 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 read(void *out, unsigned int nb_bytes)
Definition: binarystoragebuffer.h:162
void store(void *stream, unsigned int nb_bytes)
Definition: binarystoragebuffer.cc:16
Template class for the LCEs StatHandler classes.
Definition: filehandler.h:247
A class to manage the files associated with each components of the simulation.
Definition: fileservices.h:52
Breeding LCE when individuals carry the Wolbachia endosymbiotic parasite.
Definition: ttwolbachia.h:192
unsigned int _model
Definition: ttwolbachia.h:199
virtual void loadFileServices(FileServices *loader)
Definition: ttwolbachia.cc:233
double _fec_cost
Definition: ttwolbachia.h:195
virtual void execute()
Definition: ttwolbachia.cc:247
virtual ~LCE_Breed_Wolbachia()
Definition: ttwolbachia.cc:184
TTWolbachiaFH * _writer
Definition: ttwolbachia.h:203
TMatrix * _inoculum_size
Definition: ttwolbachia.h:197
virtual LifeCycleEvent * clone()
Definition: ttwolbachia.h:220
LCE_Breed_Wolbachia()
Definition: ttwolbachia.cc:170
void inoculate_wolbachia()
Definition: ttwolbachia.cc:378
double hasInfectedFemale()
Definition: ttwolbachia.cc:404
double _incomp_cost
Definition: ttwolbachia.h:194
virtual age_t addAgeClass()
Definition: ttwolbachia.h:228
virtual bool setParameters()
Definition: ttwolbachia.cc:191
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: ttwolbachia.h:226
void wolbachia_model_1()
Definition: ttwolbachia.cc:284
double _infected_fec
Definition: ttwolbachia.h:196
unsigned int _inoculum_time
Definition: ttwolbachia.h:198
virtual void loadStatServices(StatServices *loader)
Definition: ttwolbachia.h:225
void wolbachia_model_2()
Definition: ttwolbachia.cc:330
virtual age_t removeAgeClass()
Definition: ttwolbachia.h:227
virtual age_t requiredAgeClass()
Definition: ttwolbachia.h:229
void(LCE_Breed_Wolbachia::* _breed_func_ptr)()
Definition: ttwolbachia.h:201
Base class for the breeding (and mating) life cycle events.
Definition: LCEbreed.h:44
Base class of the Life Cycle Events, declares the LCE interface.
Definition: lifecycleevent.h:73
static double Uniform()
Generates a random number from [0.0, 1.0[ uniformly distributed.
Definition: Uniform.h:125
Interface to all basic components of a simulation (traits, life cycle events, pop,...
Definition: simcomponent.h:45
virtual double get_parameter_value(std::string name)
Param value getter.
Definition: simcomponent.h:143
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 Wolbachia trait.
Definition: ttwolbachia.h:115
virtual void loadStatServices(StatServices *loader)
Definition: ttwolbachia.cc:65
double _transmit_rate
Definition: ttwolbachia.h:147
virtual void reset()
Definition: ttwolbachia.h:122
virtual void init()
Definition: ttwolbachia.h:121
TTWolbachiaSH * _stats
Definition: ttwolbachia.h:148
virtual bool resetParameterFromSource(std::string param, SimComponent *cmpt)
Definition: ttwolbachia.h:142
virtual TTWolbachia * hatch()
Definition: ttwolbachia.h:126
~TProtoWolbachia()
Definition: ttwolbachia.cc:58
virtual TProtoWolbachia * clone()
Definition: ttwolbachia.h:133
virtual void store_data(BinaryStorageBuffer *saver)
Definition: ttwolbachia.h:137
virtual bool setParameters()
Definition: ttwolbachia.h:123
virtual bool retrieve_data(BinaryStorageBuffer *reader)
Definition: ttwolbachia.h:138
virtual void loadFileServices(FileServices *loader)
Definition: ttwolbachia.h:140
virtual trait_t get_type() const
Definition: ttwolbachia.h:135
TProtoWolbachia()
Definition: ttwolbachia.cc:41
FileHandler of the Wolbachia trait.
Definition: ttwolbachia.h:241
TTWolbachiaFH(LCE_Breed_Wolbachia *TP)
Definition: ttwolbachia.h:248
virtual void FHwrite()
Definition: ttwolbachia.cc:435
virtual ~TTWolbachiaFH()
Definition: ttwolbachia.h:253
void record(unsigned int repl, unsigned int gen, double infection)
Definition: ttwolbachia.cc:427
virtual void FHread(string &filename)
Definition: ttwolbachia.h:259
map< unsigned int, unsigned int > _times
Definition: ttwolbachia.h:243
vector< double > _rate
Definition: ttwolbachia.h:244
StatHandler of the Wolbachia trait.
Definition: ttwolbachia.h:157
double _Mmean
Definition: ttwolbachia.h:161
int _TTidx
Definition: ttwolbachia.h:160
double _extrate
Definition: ttwolbachia.h:161
virtual bool setStatRecorders(string &token)
Definition: ttwolbachia.cc:114
double getDemicExtinctionRate()
Definition: ttwolbachia.h:181
double getDemicInfectionVar()
Definition: ttwolbachia.h:180
double getMeanInfection(unsigned int sex)
Definition: ttwolbachia.h:173
double getMeanOffsprgFemaleInfection_perPatch(unsigned int patch)
Definition: stats_wolbachia.cc:155
double _Fmean
Definition: ttwolbachia.h:161
double getMeanMaleInfection_perPatch(unsigned int patch)
Definition: stats_wolbachia.cc:143
virtual ~TTWolbachiaSH()
Definition: ttwolbachia.h:168
double _var
Definition: ttwolbachia.h:161
double getMeanFemaleInfection_perPatch(unsigned int patch)
Definition: stats_wolbachia.cc:131
double getIcompatibleMatingFreq()
Definition: stats_wolbachia.cc:181
double getMeanOffsprgMaleInfection_perPatch(unsigned int patch)
Definition: stats_wolbachia.cc:168
TTWolbachiaSH(TProtoWolbachia *TT)
Definition: ttwolbachia.h:164
TProtoWolbachia * _trait
Definition: ttwolbachia.h:159
double getMeanOffsprgInfection(unsigned int sex)
Definition: stats_wolbachia.cc:105
void setInfectionStats()
Definition: stats_wolbachia.cc:35
Trait used to study the dynamics of spread of Wolbachia, an endosymbiotic parasite causing cytoplasmi...
Definition: ttwolbachia.h:54
virtual bool operator==(const TTrait &T)
Definition: ttwolbachia.cc:87
virtual bool operator!=(const TTrait &T)
Definition: ttwolbachia.cc:99
bool _is_infected
Definition: ttwolbachia.h:57
virtual void ** get_sequence() const
Definition: ttwolbachia.h:85
virtual void * getValue() const
Definition: ttwolbachia.h:83
virtual void init_sequence()
Definition: ttwolbachia.h:73
TTWolbachia()
Definition: ttwolbachia.h:61
virtual void set_value()
Definition: ttwolbachia.h:82
virtual void mutate()
Definition: ttwolbachia.h:77
virtual void show_up()
Definition: ttwolbachia.h:88
virtual void init()
Definition: ttwolbachia.h:72
TTWolbachia(const TTWolbachia &T)
Definition: ttwolbachia.h:64
virtual TTWolbachia * clone()
Definition: ttwolbachia.h:89
void set_transmit_rate(double val)
Definition: ttwolbachia.h:70
virtual bool retrieve_data(BinaryStorageBuffer *reader)
Definition: ttwolbachia.h:99
virtual trait_t get_type() const
Definition: ttwolbachia.h:84
virtual void set_allele_value(unsigned int locus, unsigned int allele, double value)
Definition: ttwolbachia.h:87
virtual void store_data(BinaryStorageBuffer *saver)
Definition: ttwolbachia.h:94
virtual double get_allele_value(int loc, int all)
Definition: ttwolbachia.h:86
virtual void inherit(TTrait *mother, TTrait *father)
Definition: ttwolbachia.h:75
virtual TTWolbachia & operator=(const TTrait &T)
Definition: ttwolbachia.cc:75
virtual void * set_trait(void *value)
Definition: ttwolbachia.h:79
virtual void reset()
Definition: ttwolbachia.h:74
virtual void set_sequence(void **seq)
Definition: ttwolbachia.h:81
virtual ~TTWolbachia()
Definition: ttwolbachia.h:68
double _transmit_rate
Definition: ttwolbachia.h:56
Interface for all trait types, declares all basic trait operations.
Definition: ttrait.h:46
virtual void * getValue() const =0
Genotype to phenotype mapper.
TTrait setter.
Definition: ttrait.h:125
Template class for the trait's StatHandler.
Definition: stathandler.h:168
std::string trait_t
Trait types.
Definition: types.h:63
#define WOLB
Definition: types.h:73
unsigned int age_t
Age class flags.
Definition: types.h:46
#define ADULTS
Adults age class flag (breeders).
Definition: types.h:54
#define OFFSPRG
Offspring age class flag.
Definition: types.h:50