pops-core
0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
|
Dispersal kernel providing all the radial kernels. More...
#include <switch_kernel.hpp>
Public Member Functions | |
SwitchDispersalKernel (const DispersalKernelType &dispersal_kernel_type, const RadialDispersalKernel< IntegerRaster > &radial_kernel, const DeterministicDispersalKernel< IntegerRaster > &deterministic_kernel, const UniformDispersalKernel &uniform_kernel, const NetworkDispersalKernel< RasterIndex > &network_kernel, const DeterministicNeighborDispersalKernel &deterministic_neighbor_kernel=DeterministicNeighborDispersalKernel(Direction::None), const bool deterministic=false) | |
template<typename Generator > | |
std::tuple< int, int > | operator() (Generator &generator, int row, int col) |
Generates a new position for the spread. More... | |
bool | is_cell_eligible (int row, int col) |
Static Public Member Functions | |
static bool | supports_kernel (const DispersalKernelType type) |
Returns true if the kernel class support a given kernel type. More... | |
Protected Attributes | |
DispersalKernelType | dispersal_kernel_type_ |
RadialDispersalKernel< IntegerRaster > | radial_kernel_ |
DeterministicDispersalKernel< IntegerRaster > | deterministic_kernel_ |
UniformDispersalKernel | uniform_kernel_ |
DeterministicNeighborDispersalKernel | deterministic_neighbor_kernel_ |
NetworkDispersalKernel< RasterIndex > | network_kernel_ |
bool | deterministic_ |
Dispersal kernel providing all the radial kernels.
We understand a radial kernel to be a kernel which has parameters which translate into a distance and direction.
To add new kernel, add new member, constructor parameter, its call in the function call operator, and extend the supports_kernel() function.
Definition at line 39 of file switch_kernel.hpp.
|
inline |
Definition at line 51 of file switch_kernel.hpp.
|
inline |
Definition at line 94 of file switch_kernel.hpp.
|
inline |
Generates a new position for the spread.
The randomness is based on the generator. The result may depend on previous calls of this operator (see e.g. std::cauchy_distribution<RealType>::reset()
). Parameters row and col are row and column position of the current disperser. The generated position will be relative to it.
Definition at line 74 of file switch_kernel.hpp.
|
inlinestatic |
Returns true if the kernel class support a given kernel type.
Definition at line 117 of file switch_kernel.hpp.
|
protected |
Definition at line 48 of file switch_kernel.hpp.
|
protected |
Definition at line 44 of file switch_kernel.hpp.
|
protected |
Definition at line 46 of file switch_kernel.hpp.
|
protected |
Definition at line 42 of file switch_kernel.hpp.
|
protected |
Definition at line 47 of file switch_kernel.hpp.
|
protected |
Definition at line 43 of file switch_kernel.hpp.
|
protected |
Definition at line 45 of file switch_kernel.hpp.