Parallel PopGen Package
Sim_Model::demography_exponential_growth Struct Reference

functor: models exponential growth of population size (individuals) over time More...

Public Member Functions

 demography_exponential_growth ()
 default constructor More...
 
 demography_exponential_growth (float rate, int initial_population_size, 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
 exponential growth rate More...
 
int initial_population_size
 initial population size More...
 
int generation_shift
 number of generations to shift function backwards More...
 

Detailed Description

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

Examples:
Example2-DaDi.

Definition at line 177 of file go_fish.cuh.

Constructor & Destructor Documentation

§ demography_exponential_growth() [1/2]

Sim_Model::demography_exponential_growth::demography_exponential_growth ( )
inline

default constructor

all parameters set to 0

Definition at line 295 of file template_inline_simulation_functors.cuh.

§ demography_exponential_growth() [2/2]

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

constructor

Parameters
generation_shift(optional input) default 0

Definition at line 297 of file template_inline_simulation_functors.cuh.

Member Function Documentation

§ operator()()

__host__ __device__ __forceinline__ int Sim_Model::demography_exponential_growth::operator() ( const int  population,
const int  generation 
) const

Demographic operator, returns population size (individuals), N, for a given population, generation

N = round(initial_population_size* \(e^{\textrm{rate*(generation-generation_shift)}} \))

Definition at line 299 of file template_inline_simulation_functors.cuh.

Member Data Documentation

§ rate

float Sim_Model::demography_exponential_growth::rate

exponential growth rate

Definition at line 179 of file go_fish.cuh.

§ initial_population_size

int Sim_Model::demography_exponential_growth::initial_population_size

initial population size

Definition at line 180 of file go_fish.cuh.

§ generation_shift

int Sim_Model::demography_exponential_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 181 of file go_fish.cuh.


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