|
Parallel PopGen Package
|
functor: returns the result of function f_default except at generation pulse returns the result of function f_action
More...
Public Member Functions | |
| bool_pulse () | |
| default constructor More... | |
| bool_pulse (int pulse, int generation_shift=0) | |
| constructor More... | |
| bool_pulse (Functor_default f_default_in, Functor_action f_action, int pulse, int generation_shift=0) | |
| constructor More... | |
| __host__ __forceinline__ bool | operator() (const int generation) const |
Preserving and Sampling operator, returns boolean b to turn on/off preserving and sampling in generation generation of the simulation. More... | |
Public Attributes | |
| int | pulse |
generation in which the boolean pulse f_action is emitted More... | |
| int | generation_shift |
| number of generations to shift function backwards More... | |
| Functor_default | f_default |
| default boolean function More... | |
| Functor_action | f_action |
boolean function emitted at generation pulse More... | |
functor: returns the result of function f_default except at generation pulse returns the result of function f_action
Takes in two template types: the default function and the action function to be return at generation pulse.
Pulse bool functors can be nested within each other and with piecewise bool functors for a myriad of different sampling and preserving strategies, e.g.:
Sampling strategy that takes time samples of generation 0 & generations [100,110] inclusive (& final generation is always sampled).
Note mutations present in these generations will be preserved until the final generation of the simulation.
Definition at line 298 of file go_fish.cuh.
|
inline |
default constructor
pulse = 0
generation_shift = 0
Function f_default assigned default constructor of Functor_default
Function f_action assigned default constructor of Functor_action
Definition at line 597 of file template_inline_simulation_functors.cuh.
|
inline |
constructor
Function f_default assigned default constructor of Functor_default
Function f_action assigned default constructor of Functor_action
| generation_shift | (optional input) default 0 |
Definition at line 602 of file template_inline_simulation_functors.cuh.
|
inline |
constructor
| generation_shift | (optional input) default 0 |
Definition at line 605 of file template_inline_simulation_functors.cuh.
| __host__ __forceinline__ bool Sim_Model::bool_pulse< Functor_default, Functor_action >::operator() | ( | const int | generation | ) | const |
Preserving and Sampling operator, returns boolean b to turn on/off preserving and sampling in generation generation of the simulation.
if(generation == pulse + generation_shift) b = f_action(generation)
else b = f_default(generation)
Definition at line 610 of file template_inline_simulation_functors.cuh.
| int Sim_Model::bool_pulse< Functor_default, Functor_action >::pulse |
generation in which the boolean pulse f_action is emitted
Definition at line 299 of file go_fish.cuh.
| int Sim_Model::bool_pulse< Functor_default, Functor_action >::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 300 of file go_fish.cuh.
| Functor_default Sim_Model::bool_pulse< Functor_default, Functor_action >::f_default |
default boolean function
Definition at line 301 of file go_fish.cuh.
| Functor_action Sim_Model::bool_pulse< Functor_default, Functor_action >::f_action |
boolean function emitted at generation pulse
Definition at line 302 of file go_fish.cuh.