Parallel PopGen Package
|
functor: models selection as a sine wave through time More...
Public Member Functions | |
selection_sine_wave () | |
default constructor More... | |
selection_sine_wave (float A, float pi, float D, float rho=0, int generation_shift=0) | |
constructor More... | |
template<typename Functor_demography , typename Functor_inbreeding > | |
selection_sine_wave (float gamma_A, float pi, float gamma_D, Functor_demography demography, Functor_inbreeding F, float rho=0, int generation_shift=0, int forward_generation_shift=0) | |
constructor: effective selection gamma_A, gamma_D 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 | |
float | A |
Amplitude of sine wave. More... | |
float | pi |
Frequency of sine wave. More... | |
float | rho |
Phase of sine wave. More... | |
float | D |
Offset of sine wave. More... | |
int | generation_shift |
number of generations to shift function backwards More... | |
functor: models selection as a sine wave through time
useful for modeling cyclical/seasonal behavior over time
Definition at line 55 of file go_fish.cuh.
|
inline |
default constructor
all parameters set to 0
Definition at line 78 of file template_inline_simulation_functors.cuh.
|
inline |
constructor
rho | (optional input) default 0 |
generation_shift | (optional input) default 0 |
Definition at line 80 of file template_inline_simulation_functors.cuh.
|
inline |
constructor: effective selection gamma_A, gamma_D
A = gamma_A/(2*demography(0,forward_generation_shift)/(1+F(0,forward_generation_shift)))
D = gamma_D/(2*demography(0,forward_generation_shift)/(1+F(0,forward_generation_shift)))
rho | (optional input) default 0 |
generation_shift | (optional input) default 0 |
forward_generation_shift | (optional input) default 0 allows you to push the population size and inbreeding coefficient value to the state forward in time - useful if you are starting the simulation from a previous simulation state and are using the same functions as the previous simulation or any time you want to shift the generation of the demography and inbreeding functions from 0 |
Definition at line 87 of file template_inline_simulation_functors.cuh.
__device__ __forceinline__ float Sim_Model::selection_sine_wave::operator() | ( | const int | population, |
const int | generation, | ||
const float | freq | ||
) | const |
selection operator, returns selection coefficient, s
, for a given population, generation, freq
s = A*sin(pi*(generation-generation_shift) + rho) + D
Definition at line 92 of file template_inline_simulation_functors.cuh.
float Sim_Model::selection_sine_wave::A |
Amplitude of sine wave.
Definition at line 57 of file go_fish.cuh.
float Sim_Model::selection_sine_wave::pi |
Frequency of sine wave.
Definition at line 58 of file go_fish.cuh.
float Sim_Model::selection_sine_wave::rho |
Phase of sine wave.
Definition at line 59 of file go_fish.cuh.
float Sim_Model::selection_sine_wave::D |
Offset of sine wave.
Definition at line 60 of file go_fish.cuh.
int Sim_Model::selection_sine_wave::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 61 of file go_fish.cuh.