Nemo  2.4.2
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
ttquanti.cc File Reference
#include <sstream>
#include <fstream>
#include <string.h>
#include <cmath>
#include <algorithm>
#include <utility>
#include "simenv.h"
#include "ttquanti.h"
#include "ttquanti_bitstring.h"
#include "ttquanti_epistasis.h"
#include "filehandler.h"
#include "output.h"
#include "Uniform.h"
#include "tstring.h"
#include "utils.h"

Functions

void store_quanti_trait_values (Patch *patch, unsigned int patchID, unsigned int size, unsigned int *cntr, sex_t SEX, age_idx AGE, DataTable< double > *ptable, DataTable< double > *gtable, unsigned int nTrait, unsigned int TraitIndex)
 

Function Documentation

◆ store_quanti_trait_values()

void store_quanti_trait_values ( Patch patch,
unsigned int  patchID,
unsigned int  size,
unsigned int *  cntr,
sex_t  SEX,
age_idx  AGE,
DataTable< double > *  ptable,
DataTable< double > *  gtable,
unsigned int  nTrait,
unsigned int  TraitIndex 
)
5201 {
5202  double *phe;
5203  TTQuanti *trait;
5204 
5205  for(unsigned int j = 0; j < size; ++j) {
5206 
5207  trait = dynamic_cast<TTQuanti*> (patch->get(SEX, AGE, j)->getTrait( TraitIndex ));
5208 
5209  phe = (double*)trait->getValue();
5210 
5211  for(unsigned int k = 0; k < nTrait; k++){
5212  ptable->set( k, patchID, (*cntr), phe[k]);
5213  gtable->set( k, patchID, (*cntr), trait->get_full_genotype(k));
5214  }
5215  (*cntr)++;
5216  }
5217 
5218 }
void set(unsigned int group, unsigned int Class, unsigned int elmnt, T val)
Sets the element 'elmnt' of the class 'Class' in the group 'group' to the value 'val'.
Definition: datatable.h:230
TTrait * getTrait(IDX T)
Trait accessor.
Definition: individual.h:275
Individual * get(sex_t SEX, age_idx AGE, unsigned int at)
Returns a pointer to the individual sitting at the index passed.
Definition: metapop.h:532
TTQuanti.
Definition: ttquanti.h:59
virtual void * getValue() const
Definition: ttquanti.h:77
virtual double get_full_genotype(unsigned int trait)=0

References Patch::get(), TTQuanti::get_full_genotype(), Individual::getTrait(), TTQuanti::getValue(), and DataTable< T >::set().

Referenced by TTQuantiSH::setDataTables().

+ Here is the caller graph for this function:

Generated for Nemo v2.4.2 by  doxygen 1.9.1

Catalogued on GSR