Parallel PopGen Package
|
functor: models population size (individuals) as a sine wave through time More...
Public Member Functions | |
demography_sine_wave () | |
default constructor More... | |
demography_sine_wave (float A, float pi, int D, float rho=0, int generation_shift=0) | |
constructor More... | |
__host__ __device__ __forceinline__ int | operator() (const int population, const int generation) const |
Demographic operator, returns population size (individuals), N , for a given population, generation 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 population size (individuals) as a sine wave through time
useful for modeling cyclical/seasonal behavior over time
Definition at line 163 of file go_fish.cuh.
|
inline |
default constructor
all parameters set to 0
Definition at line 288 of file template_inline_simulation_functors.cuh.
|
inline |
constructor
rho | (optional input) default 0 |
generation_shift | (optional input) default 0 |
Definition at line 289 of file template_inline_simulation_functors.cuh.
__host__ __device__ __forceinline__ int Sim_Model::demography_sine_wave::operator() | ( | const int | population, |
const int | generation | ||
) | const |
Demographic operator, returns population size (individuals), N
, for a given population, generation
N = A*sin(pi*(generation-generation_shift) + rho) + D
Definition at line 291 of file template_inline_simulation_functors.cuh.
float Sim_Model::demography_sine_wave::A |
Amplitude of sine wave.
Definition at line 165 of file go_fish.cuh.
float Sim_Model::demography_sine_wave::pi |
Frequency of sine wave.
Definition at line 166 of file go_fish.cuh.
float Sim_Model::demography_sine_wave::rho |
Phase of sine wave.
Definition at line 167 of file go_fish.cuh.
float Sim_Model::demography_sine_wave::D |
Offset of sine wave.
Definition at line 168 of file go_fish.cuh.
int Sim_Model::demography_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 169 of file go_fish.cuh.