Parallel PopGen Package
|
functor: migration flows at rate m
from pop1
to pop2
and function rest
for all other migration rates
More...
Public Member Functions | |
migration_constant_directional () | |
default constructor More... | |
migration_constant_directional (float m, int pop1, int pop2, Functor_m1 rest_in) | |
constructor More... | |
__host__ __device__ __forceinline__ float | operator() (const int pop_FROM, const int pop_TO, const int generation) const |
Migration operator, returns migration rate, mig_rate , which is the proportion of chromosomes in pop_TO from pop_FROM for a given generation More... | |
Public Attributes | |
float | m |
migration rate from pop1 to pop2 More... | |
int | pop1 |
pop_FROM More... | |
int | pop2 |
pop_TO More... | |
Functor_m1 | rest |
migration function specifying migration in remaining migration directions More... | |
functor: migration flows at rate m
from pop1
to pop2
and function rest
for all other migration rates
Takes in one template type: the migration function to be returned for all other migration directions than from pop1 to pop2.
Constant directional migration functors can be nested within each other and with piecewise migration functors for multiple migration directions 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 243 of file go_fish.cuh.
|
inline |
default constructor
m = 0
pop1 = 0
pop2 = 0
Function rest
assigned default constructor of Functor_m1
Definition at line 469 of file template_inline_simulation_functors.cuh.
|
inline |
constructor
Definition at line 471 of file template_inline_simulation_functors.cuh.
__host__ __device__ __forceinline__ float Sim_Model::migration_constant_directional< Functor_m1 >::operator() | ( | const int | pop_FROM, |
const int | pop_TO, | ||
const int | generation | ||
) | const |
Migration operator, returns migration rate, mig_rate
, which is the proportion of chromosomes in pop_TO
from pop_FROM
for a given generation
if(pop_FROM == pop1 && pop_TO == pop2) mig_rate = m
else mig_rate = rest(pop_FROM,pop_TO,generation)
Definition at line 476 of file template_inline_simulation_functors.cuh.
float Sim_Model::migration_constant_directional< Functor_m1 >::m |
migration rate from pop1
to pop2
Definition at line 245 of file go_fish.cuh.
int Sim_Model::migration_constant_directional< Functor_m1 >::pop1 |
pop_FROM
Definition at line 246 of file go_fish.cuh.
int Sim_Model::migration_constant_directional< Functor_m1 >::pop2 |
pop_TO
Definition at line 247 of file go_fish.cuh.
Functor_m1 Sim_Model::migration_constant_directional< Functor_m1 >::rest |
migration function specifying migration in remaining migration directions
Definition at line 248 of file go_fish.cuh.