Parallel PopGen Package
|
functor: one population, pop
, has a different, demography function, d_pop
, all others have function, d
More...
Public Member Functions | |
demography_population_specific () | |
default constructor More... | |
demography_population_specific (Functor_d d_in, Functor_d_pop d_pop_in, int pop, int generation_shift=0) | |
constructor More... | |
__host__ __device__ __forceinline__ int | operator() (const int population, const int generation) const |
Public Attributes | |
int | pop |
population with specific demography function More... | |
int | generation_shift |
number of generations to shift function backwards More... | |
Functor_d | d |
demographic function applied to all other populations More... | |
Functor_d_pop | d_pop |
population specific demographic function for pop More... | |
functor: one population, pop
, has a different, demography function, d_pop
, all others have function, d
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 demographic functors can be nested within each other and with piecewise demographic functors for multiple populations and multiple time functions, e.g.:
Using both demographic and migration functors, population 0 splits in two, forming population 1 in the first generation. Population 1's size increases exponentially afterwards with no further migration between the groups
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 203 of file go_fish.cuh.
|
inline |
default constructor
pop = 0
generation_shift = 0
Function d
assigned default constructor of Functor_d
Function d_pop
assigned default constructor of Functor_d_pop
Definition at line 345 of file template_inline_simulation_functors.cuh.
|
inline |
constructor
generation_shift | (optional input) default 0 |
Definition at line 348 of file template_inline_simulation_functors.cuh.
__host__ __device__ __forceinline__ int Sim_Model::demography_population_specific< Functor_d, Functor_d_pop >::operator() | ( | const int | population, |
const int | generation | ||
) | const |
if(pop == population) N = d_pop(population, generation-generation_shift)
else N = d(population, generation-generation_shift)
Definition at line 352 of file template_inline_simulation_functors.cuh.
int Sim_Model::demography_population_specific< Functor_d, Functor_d_pop >::pop |
population with specific demography function
Definition at line 205 of file go_fish.cuh.
int Sim_Model::demography_population_specific< Functor_d, Functor_d_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 206 of file go_fish.cuh.
Functor_d Sim_Model::demography_population_specific< Functor_d, Functor_d_pop >::d |
demographic function applied to all other populations
Definition at line 207 of file go_fish.cuh.
Functor_d_pop Sim_Model::demography_population_specific< Functor_d, Functor_d_pop >::d_pop |
population specific demographic function for pop
Definition at line 208 of file go_fish.cuh.