Parallel PopGen Package
Sim_Model::demography_logistic_growth Struct Reference

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...
 

Detailed Description

functor: models logistic growth of population size (individuals) over time

Definition at line 189 of file go_fish.cuh.

Constructor & Destructor Documentation

§ demography_logistic_growth() [1/2]

Sim_Model::demography_logistic_growth::demography_logistic_growth ( )
inline

default constructor

all parameters set to 0

Definition at line 303 of file template_inline_simulation_functors.cuh.

§ demography_logistic_growth() [2/2]

Sim_Model::demography_logistic_growth::demography_logistic_growth ( float  rate,
int  initial_population_size,
int  carrying_capacity,
int  generation_shift = 0 
)
inline

constructor

Parameters
generation_shift(optional input) default 0

Definition at line 304 of file template_inline_simulation_functors.cuh.

Member Function Documentation

§ operator()()

__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.

Member Data Documentation

§ rate

float Sim_Model::demography_logistic_growth::rate

logistic growth rate

Definition at line 191 of file go_fish.cuh.

§ initial_population_size

int Sim_Model::demography_logistic_growth::initial_population_size

initial population size

Definition at line 192 of file go_fish.cuh.

§ carrying_capacity

int Sim_Model::demography_logistic_growth::carrying_capacity

carrying capacity

Definition at line 193 of file go_fish.cuh.

§ generation_shift

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.


The documentation for this struct was generated from the following files: