#include <quetzal/demography/demographic_policy.hpp>
Policy class to specialize the quetzal::demography::History class for simulation of population with large density.
Simulate the demographic history by considering populations of individuals as divisible masses.
|
class | neighboring_migration |
| Dispersal kernel compatible with the mass-based policy, but that restricts migration to the vecinity of each deme. More...
|
|
|
using | value_type = unsigned int |
|
|
template<typename T , typename F > |
static auto | make_distance_based_dispersal (std::vector< T > const &coords, F f) |
| Build a dispersal kernel usable with class History specialized for mass-based simulation policy.
|
|
template<typename T , typename F > |
static auto | make_sparse_distance_based_dispersal (std::vector< T > const &coords, F f) |
| Contruct a dispersal kernel compatible with the mass-based policy.
|
|
template<typename T , typename U , typename V > |
static neighboring_migration< T, U, V > | make_neighboring_migration (T, double emigrant_rate, U friction, V get_neighbors) |
| Helper function to create a dispersal kernel compatible with History specialized for the mass-based policy, but that restricts migration to the vecinity of each deme.
|
|
◆ make_distance_based_dispersal()
template<typename T , typename F >
static auto quetzal::demography::demographic_policy::mass_based::make_distance_based_dispersal |
( |
std::vector< T > const & |
coords, |
|
|
F |
f |
|
) |
| |
|
inlinestatic |
Build a dispersal kernel usable with class History specialized for mass-based simulation policy.
- Parameters
-
coords | a vector of geographic points |
f | a functor giving the migration coefficient between two points The signature should be equivalent to double f(T const& x, T const& Y) |
- Returns
- A dispersal kernel
◆ make_neighboring_migration()
template<typename T , typename U , typename V >
static neighboring_migration< T, U, V > quetzal::demography::demographic_policy::mass_based::make_neighboring_migration |
( |
T |
, |
|
|
double |
emigrant_rate, |
|
|
U |
friction, |
|
|
V |
get_neighbors |
|
) |
| |
|
inlinestatic |
Helper function to create a dispersal kernel compatible with History specialized for the mass-based policy, but that restricts migration to the vecinity of each deme.
For more flexibility, vecinity is defined by an external callable (does not have to be only the four nearest neighbours). This implementation should be chosen when the scale of the migration is much less than the scale of a deme.
- Template Parameters
-
T | Coordinates type |
U | functor used to describe friction of a deme. Its signature should be equivalent to double f(T const& x) |
V | functor giving the neighbours of a deme. Signature should be equivalent to std::vector<T> f(T const& x) |
◆ make_sparse_distance_based_dispersal()
template<typename T , typename F >
static auto quetzal::demography::demographic_policy::mass_based::make_sparse_distance_based_dispersal |
( |
std::vector< T > const & |
coords, |
|
|
F |
f |
|
) |
| |
|
inlinestatic |
Contruct a dispersal kernel compatible with the mass-based policy.
This implementation should be chosen when the migration coefficients are expected to be null over most of the landscape.
- Parameters
-
coords | a container of geopgrahic points |
f | a functor giving the migration coefficient between two points The signature should be equivalent to double f(T const& x, T const& Y) |
- Returns
- A dispersal kernel
The documentation for this class was generated from the following file: