pops-core
0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
|
Dispersal kernel for random uniform dispersal over the whole landscape. More...
#include <uniform_kernel.hpp>
Public Member Functions | |
UniformDispersalKernel (int row_max, int col_max) | |
template<typename Generator > | |
std::tuple< int, int > | operator() (Generator &generator, int row, int col) |
Generates a new position for the spread. More... | |
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 | |
int | row_max_ |
int | col_max_ |
std::uniform_int_distribution | row_distribution |
std::uniform_int_distribution | col_distribution |
Dispersal kernel for random uniform dispersal over the whole landscape.
This class is a good example of how to write a kernel and it is useful for testing due to its simplicity. It tends to generate a lot of spread because it quickly spreads over the landscape. However, it may work as a good starting point for cases where no theory about the spread is available.
Definition at line 34 of file uniform_kernel.hpp.
|
inline |
Definition at line 43 of file uniform_kernel.hpp.
|
inline |
Generates a new position for the spread.
The randomness is based on the generator. The new position does not depend on the position of the current disperser thus row and col are unused.
Definition at line 57 of file uniform_kernel.hpp.
|
inlinestatic |
Returns true if the kernel class support a given kernel type.
Definition at line 67 of file uniform_kernel.hpp.
|
protected |
Definition at line 40 of file uniform_kernel.hpp.
|
protected |
Definition at line 38 of file uniform_kernel.hpp.
|
protected |
Definition at line 39 of file uniform_kernel.hpp.
|
protected |
Definition at line 37 of file uniform_kernel.hpp.