Quetzal-CoaTL
The Coalescence Template Library
Loading...
Searching...
No Matches
quetzal::demography::demographic_policy::mass_based::neighboring_migration< Space, F1, F2 > Class Template Reference

#include <quetzal/demography/demographic_policy.hpp>

Detailed Description

template<typename Space, typename F1, typename F2>
class quetzal::demography::demographic_policy::mass_based::neighboring_migration< Space, F1, F2 >

Dispersal kernel compatible with the mass-based policy, but that restricts migration to the vecinity of each deme.

Remarks
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. This class is not meant to be used directly, but instanciated through the use of the helper function make_neighboring_migration()

Parameters
coordsa container of geopgrahic points
fa 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

Public Types

using coord_type = Space
 

Public Member Functions

 neighboring_migration (double emigrant_rate, F1 friction, F2 get_neighbors)
 
std::vector< coord_type > arrival_space (coord_type const &x) const
 Defines arrival space (that is in this class case, vecinity plus focal deme) from coordinate x.
 
auto operator() (coord_type const &from, coord_type const &to)
 Migration rate, operator interfaceable with History algorithm.
 

Member Function Documentation

◆ arrival_space()

template<typename Space , typename F1 , typename F2 >
std::vector< coord_type > quetzal::demography::demographic_policy::mass_based::neighboring_migration< Space, F1, F2 >::arrival_space ( coord_type const &  x) const
inline

Defines arrival space (that is in this class case, vecinity plus focal deme) from coordinate x.

Remarks
Interface required in expansion algorithm.

The documentation for this class was generated from the following file: