Parallel PopGen Package
|
functor: models logistic growth of population size (individuals) over time More...
Public Member Functions | |
demography_logistic_growth () | |
default constructor More... | |
demography_logistic_growth (float rate, int initial_population_size, int carrying_capacity, 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 | rate |
logistic growth rate More... | |
int | initial_population_size |
initial population size More... | |
int | carrying_capacity |
carrying capacity More... | |
int | generation_shift |
number of generations to shift function backwards More... | |
functor: models logistic growth of population size (individuals) over time
Definition at line 189 of file go_fish.cuh.
|
inline |
default constructor
all parameters set to 0
Definition at line 303 of file template_inline_simulation_functors.cuh.
|
inline |
constructor
generation_shift | (optional input) default 0 |
Definition at line 304 of file template_inline_simulation_functors.cuh.
__host__ __device__ __forceinline__ int Sim_Model::demography_logistic_growth::operator() | ( | const int | population, |
const int | generation | ||
) | const |
Demographic operator, returns population size (individuals), N
, for a given population, generation
exp_term =
\(e^{\textrm{rate*(generation-generation_shift)}} \)
N = round((carrying_capacity*initial_population_size*exp_term)
\(\div\)(carrying_capacity + initial_population_size*(exp_term-1)))
Definition at line 307 of file template_inline_simulation_functors.cuh.
float Sim_Model::demography_logistic_growth::rate |
logistic growth rate
Definition at line 191 of file go_fish.cuh.
int Sim_Model::demography_logistic_growth::initial_population_size |
initial population size
Definition at line 192 of file go_fish.cuh.
int Sim_Model::demography_logistic_growth::carrying_capacity |
carrying capacity
Definition at line 193 of file go_fish.cuh.
int Sim_Model::demography_logistic_growth::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 194 of file go_fish.cuh.