Parallel PopGen Package
Sim_Model::migration_constant_equal Struct Reference

functor: migration flows at rate m from pop i to pop j =/= i and 1-(num_pop-1)*m for i == j More...

Public Member Functions

 migration_constant_equal ()
 default constructor More...
 
 migration_constant_equal (float m, int num_pop)
 constructor More...
 
__host__ __device__ __forceinline__ float operator() (const int pop_FROM, const int pop_TO, const int generation) const
 Migration operator, returns migration rate, mig_rate, which is the proportion of chromosomes in pop_TO from pop_FROM for a given generation More...
 

Public Attributes

float m
 migration rate from pop i to pop j =/= i More...
 
int num_pop
 number of population participating in equal migration More...
 

Detailed Description

functor: migration flows at rate m from pop i to pop j =/= i and 1-(num_pop-1)*m for i == j

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

Definition at line 232 of file go_fish.cuh.

Constructor & Destructor Documentation

§ migration_constant_equal() [1/2]

Sim_Model::migration_constant_equal::migration_constant_equal ( )
inline

default constructor

m = 0
num_pop = 1

Definition at line 427 of file template_inline_simulation_functors.cuh.

§ migration_constant_equal() [2/2]

Sim_Model::migration_constant_equal::migration_constant_equal ( float  m,
int  num_pop 
)
inline

constructor

minimum number of populations is 1 - i.e. num_pop = maximum(num_pop,1)

Definition at line 428 of file template_inline_simulation_functors.cuh.

Member Function Documentation

§ operator()()

__host__ __device__ __forceinline__ float Sim_Model::migration_constant_equal::operator() ( const int  pop_FROM,
const int  pop_TO,
const int  generation 
) const

Migration operator, returns migration rate, mig_rate, which is the proportion of chromosomes in pop_TO from pop_FROM for a given generation

if(pop_FROM == pop_TO) mig_rate = 1-(num_pop-1)*m
else mig_rate = m

Definition at line 432 of file template_inline_simulation_functors.cuh.

Member Data Documentation

§ m

float Sim_Model::migration_constant_equal::m

migration rate from pop i to pop j =/= i

Definition at line 234 of file go_fish.cuh.

§ num_pop

int Sim_Model::migration_constant_equal::num_pop

number of population participating in equal migration

Definition at line 235 of file go_fish.cuh.


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