pops-core
0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
|
Dispersal kernel for dispersal over a network. More...
#include <network_kernel.hpp>
Public Member Functions | |
NetworkDispersalKernel (const Network< RasterIndex > &network, double min_time, double max_time) | |
Create kernel. More... | |
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) |
Test if cell is eligible to be used with the kernel. 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 | |
const Network< RasterIndex > & | network_ |
Reference to the network. More... | |
std::uniform_real_distribution< double > | time_distribution_ |
Travel Time distribnution. More... | |
Dispersal kernel for dispersal over a network.
Network node must be present in the cell to start traveling, so is_cell_eligible() needs to be called first to see if the kernel can be used with the given row and column.
Definition at line 725 of file network_kernel.hpp.
|
inline |
Create kernel.
The kernel assumes that the network is already initialized. It does not modify the network.
The min_time and max_time parameters are used as a range for uniform real distribution which determines the travel time through the network for one trip.
network | Existing network |
min_time | Minimum travel time |
max_time | Maximum travel time |
Definition at line 742 of file network_kernel.hpp.
|
inline |
Test if cell is eligible to be used with the kernel.
row | Row to be used with the kernel |
col | Column to be used with the kernel |
Definition at line 768 of file network_kernel.hpp.
|
inline |
Generates a new position for the spread.
std::invalid_argument | if there is no network node at a given row and col (can be checked with is_cell_eligible() beforehand) |
Definition at line 753 of file network_kernel.hpp.
|
inlinestatic |
Returns true if the kernel class support a given kernel type.
Definition at line 775 of file network_kernel.hpp.
|
protected |
Reference to the network.
Definition at line 782 of file network_kernel.hpp.
|
protected |
Travel Time distribnution.
Definition at line 784 of file network_kernel.hpp.