Parallel PopGen Package
Sim_Model::F_mu_h_sine_wave Struct Reference

functor: models parameter as a sine wave through time More...

Public Member Functions

 F_mu_h_sine_wave ()
 default constructor More...
 
 F_mu_h_sine_wave (float A, float pi, float D, float rho=0, int generation_shift=0)
 constructor More...
 
__host__ __forceinline__ float operator() (const int population, const int generation) const
 Inbreeding/Mutation/Dominance operator, returns parameter p 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...
 

Detailed Description

functor: models parameter as a sine wave through time

useful for modeling cyclical/seasonal behavior over time

Definition at line 110 of file go_fish.cuh.

Constructor & Destructor Documentation

§ F_mu_h_sine_wave() [1/2]

Sim_Model::F_mu_h_sine_wave::F_mu_h_sine_wave ( )
inline

default constructor

all parameters set to 0

Definition at line 187 of file template_inline_simulation_functors.cuh.

§ F_mu_h_sine_wave() [2/2]

Sim_Model::F_mu_h_sine_wave::F_mu_h_sine_wave ( float  A,
float  pi,
float  D,
float  rho = 0,
int  generation_shift = 0 
)
inline

constructor

Parameters
rho(optional input) default 0
generation_shift(optional input) default 0

Definition at line 188 of file template_inline_simulation_functors.cuh.

Member Function Documentation

§ operator()()

__host__ __forceinline__ float Sim_Model::F_mu_h_sine_wave::operator() ( const int  population,
const int  generation 
) const

Inbreeding/Mutation/Dominance operator, returns parameter p for a given population, generation

p = A*sin(pi*(generation-generation_shift) + rho) + D

Definition at line 190 of file template_inline_simulation_functors.cuh.

Member Data Documentation

§ A

float Sim_Model::F_mu_h_sine_wave::A

Amplitude of sine wave.

Definition at line 112 of file go_fish.cuh.

§ pi

float Sim_Model::F_mu_h_sine_wave::pi

Frequency of sine wave.

Definition at line 113 of file go_fish.cuh.

§ rho

float Sim_Model::F_mu_h_sine_wave::rho

Phase of sine wave.

Definition at line 114 of file go_fish.cuh.

§ D

float Sim_Model::F_mu_h_sine_wave::D

Offset of sine wave.

Definition at line 115 of file go_fish.cuh.

§ generation_shift

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


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