Parallel PopGen Package
|
functor: parameter function changes from p1
to p2
at generation inflection_point
More...
Public Member Functions | |
F_mu_h_piecewise () | |
default constructor More... | |
F_mu_h_piecewise (Functor_p1 p1_in, Functor_p2 p2_in, int inflection_point, int generation_shift=0) | |
constructor More... | |
__host__ __forceinline__ float | operator() (const int population, const int generation) const |
Inbreeding/Mutation/Dominance operator, returns parameter p for a given population, generation More... | |
Public Attributes | |
int | inflection_point |
generation in which the Inbreeding/Mutation/Dominance function switches from p1 to p2 More... | |
int | generation_shift |
number of generations to shift function backwards More... | |
Functor_p1 | p1 |
first parameter function More... | |
Functor_p2 | p2 |
second parameter function More... | |
functor: parameter function changes from p1
to p2
at generation inflection_point
Takes in two template types: the function to be returned before the inflection_point
and the function for after the inflection_point
.
Piecewise parameter functors can be nested within each other and with population specific parameter functors for multiple populations and multiple time functions, e.g.:
3 populations with different Inbreeding coefficients where populations in the 1st are outbred, in the 2nd are partially inbred, and in the 3rd are completely inbred until population becomes completely outcrossing at generation 300
The modularity of these functor templates allow parameter models to be extended to any number of populations and piecewise parameter functions (including user defined functions).
Definition at line 138 of file go_fish.cuh.
|
inline |
default constructor
inflection_point = 0
generation_shift = 0
Function p1
assigned default constructor of Functor_p1
Function p2
assigned default constructor of Functor_p2
Definition at line 246 of file template_inline_simulation_functors.cuh.
|
inline |
constructor
generation_shift | (optional input) default 0 |
Definition at line 249 of file template_inline_simulation_functors.cuh.
__host__ __forceinline__ float Sim_Model::F_mu_h_piecewise< Functor_p1, Functor_p2 >::operator() | ( | const int | population, |
const int | generation | ||
) | const |
Inbreeding/Mutation/Dominance operator, returns parameter p
for a given population, generation
if(generation >= inflection_point+generation_shift) p = p2(population, generation-generation_shift)
else p = p1(population, generation-generation_shift)
Definition at line 253 of file template_inline_simulation_functors.cuh.
int Sim_Model::F_mu_h_piecewise< Functor_p1, Functor_p2 >::inflection_point |
generation in which the Inbreeding/Mutation/Dominance function switches from p1
to p2
Definition at line 140 of file go_fish.cuh.
int Sim_Model::F_mu_h_piecewise< Functor_p1, Functor_p2 >::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 141 of file go_fish.cuh.
Functor_p1 Sim_Model::F_mu_h_piecewise< Functor_p1, Functor_p2 >::p1 |
first parameter function
Definition at line 142 of file go_fish.cuh.
Functor_p2 Sim_Model::F_mu_h_piecewise< Functor_p1, Functor_p2 >::p2 |
second parameter function
Definition at line 143 of file go_fish.cuh.