Parallel PopGen Package
|
functor: one population, pop
, has a different, selection function, s_pop
, all other have function s
More...
Public Member Functions | |
selection_population_specific () | |
default constructor More... | |
selection_population_specific (Functor_sel s_in, Functor_sel_pop s_pop_in, int pop, int generation_shift=0) | |
constructor More... | |
__device__ __forceinline__ float | operator() (const int population, const int generation, const float freq) const |
selection operator, returns selection coefficient, s , for a given population, generation, freq More... | |
Public Attributes | |
int | pop |
population with specific selection function More... | |
int | generation_shift |
number of generations to shift function backwards More... | |
Functor_sel | s |
selection function applied to all other populations More... | |
Functor_sel_pop | s_pop |
population specific selection function for pop More... | |
functor: one population, pop
, has a different, selection function, s_pop
, all other have function s
Takes in two template types: the function to be returned for the rest of the populations and the function for the specific population, pop
.
Population specific selection functors can be nested within each other and with piecewise selection functors for multiple populations and multiple time functions, e.g.:
3 populations with different selection coefficients where mutations in the 1st are neutral, in the 2nd are deleterious, and in the 3rd are beneficial up to generation 300 when selection relaxes and they become neutral
The modularity of these functor templates allow selection models to be extended to any number of populations and piecewise selection functions (including user defined functions).
Definition at line 72 of file go_fish.cuh.
|
inline |
default constructor
pop = 0
generation_shift = 0
Function s
assigned default constructor of Functor_sel
Function s_pop
assigned default constructor of Functor_sel_pop
Definition at line 115 of file template_inline_simulation_functors.cuh.
|
inline |
constructor
generation_shift | (optional input) default 0 |
Definition at line 118 of file template_inline_simulation_functors.cuh.
__device__ __forceinline__ float Sim_Model::selection_population_specific< Functor_sel, Functor_sel_pop >::operator() | ( | const int | population, |
const int | generation, | ||
const float | freq | ||
) | const |
selection operator, returns selection coefficient, s
, for a given population, generation, freq
if(pop == population) s = s_pop(population, generation-generation_shift, freq)
else s = s(population, generation-generation_shift, freq)
Definition at line 122 of file template_inline_simulation_functors.cuh.
int Sim_Model::selection_population_specific< Functor_sel, Functor_sel_pop >::pop |
population with specific selection function
Definition at line 74 of file go_fish.cuh.
int Sim_Model::selection_population_specific< Functor_sel, Functor_sel_pop >::generation_shift |
number of generations to shift function backwards
useful if you are starting the simulation from a previous simulation state and this function is expecting to start at 0 or any scenario where you want to shift the generation of the function relative to the simulation generation
Definition at line 75 of file go_fish.cuh.
Functor_sel Sim_Model::selection_population_specific< Functor_sel, Functor_sel_pop >::s |
selection function applied to all other populations
Definition at line 76 of file go_fish.cuh.
Functor_sel_pop Sim_Model::selection_population_specific< Functor_sel, Functor_sel_pop >::s_pop |
population specific selection function for pop
Definition at line 77 of file go_fish.cuh.