Parallel PopGen Package
Sim_Model::selection_constant Struct Reference

functor: models selection coefficient s as a constant across populations and over time More...

Public Member Functions

 selection_constant ()
 default constructor More...
 
 selection_constant (float s)
 constructor More...
 
template<typename Functor_demography , typename Functor_inbreeding >
 selection_constant (float gamma, Functor_demography demography, Functor_inbreeding F, int forward_generation_shift=0)
 constructor: effective selection 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 s
 selection coefficient More...
 

Detailed Description

functor: models selection coefficient s as a constant across populations and over time

Examples:
Example1-Speed, Example2-DaDi, and Example3-Compilation.

Definition at line 32 of file go_fish.cuh.

Constructor & Destructor Documentation

§ selection_constant() [1/3]

Sim_Model::selection_constant::selection_constant ( )
inline

default constructor

s = 0

Definition at line 46 of file template_inline_simulation_functors.cuh.

§ selection_constant() [2/3]

Sim_Model::selection_constant::selection_constant ( float  s)
inline

constructor

Definition at line 47 of file template_inline_simulation_functors.cuh.

§ selection_constant() [3/3]

template<typename Functor_demography , typename Functor_inbreeding >
Sim_Model::selection_constant::selection_constant ( float  gamma,
Functor_demography  demography,
Functor_inbreeding  F,
int  forward_generation_shift = 0 
)
inline

constructor: effective selection

s = gamma/(2*demography(0,forward_generation_shift)/(1+F(0,forward_generation_shift)))

Parameters
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 52 of file template_inline_simulation_functors.cuh.

Member Function Documentation

§ operator()()

__device__ __forceinline__ float Sim_Model::selection_constant::operator() ( const int  population,
const int  generation,
const float  freq 
) const

selection operator, returns selection coefficient, s, for a given population, generation, freq

Definition at line 53 of file template_inline_simulation_functors.cuh.

Member Data Documentation

§ s

float Sim_Model::selection_constant::s

selection coefficient

Definition at line 34 of file go_fish.cuh.


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