pops-core
0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
|
Go to the documentation of this file.
16 #ifndef POPS_DETERMINISTIC_KERNEL_HPP
17 #define POPS_DETERMINISTIC_KERNEL_HPP
58 template<
typename IntegerRaster>
116 const IntegerRaster& dispersers,
117 double dispersal_percentage,
120 double distance_scale,
125 weibull(distance_scale, shape),
131 gamma(distance_scale, shape),
185 double distance_to_center = std::sqrt(
236 template<
class Generator>
237 std::tuple<int, int>
operator()(Generator& generator,
int row,
int col)
250 throw std::invalid_argument(
251 "DeterministicDispersalKernel: Unsupported dispersal kernel type");
259 int row_movement = 0;
260 int col_movement = 0;
262 double max = (double)-std::numeric_limits<int>::max();
263 int max_prob_row = 0;
264 int max_prob_col = 0;
287 return std::make_tuple(row + row_movement, col + col_movement);
297 static const std::array<DispersalKernelType, 10> supports = {
308 auto it = std::find(supports.cbegin(), supports.cend(), type);
309 return it != supports.cend();
315 #endif // POPS_DETERMINISTIC_KERNEL_HPP
@ HyperbolicSecant
Hyperbolic secant dispersal kernel.
DispersalKernelType kernel_type_
@ Gamma
Gamma dispersal kernel.
ExponentialPowerKernel exponential_power
Raster< double > probability_copy
@ Logistic
Logistic dispersal kernel.
double icdf(double x)
Hyperbolic secant inverse cumulative distribution (quantile) function Used by DeterministicKernel to ...
Dispersal kernel for weibull distribution class utilized by RadialKernel and DeterministicKernel.
std::tuple< int, int > operator()(Generator &generator, int row, int col)
Generates a new position for the spread.
double icdf(double x)
Power law inverse cumulative distribution (quantile) function Used by DeterministicKernel to determin...
DeterministicDispersalKernel(DispersalKernelType dispersal_kernel, const IntegerRaster &dispersers, double dispersal_percentage, double ew_res, double ns_res, double distance_scale, double shape=1.0)
DeterministicDispersalKernel constructor.
@ Exponential
Exponential dispersal kernel.
double pdf(double x)
Exponential Power probability density function Used by DeterministicKernel to determine location of s...
LogNormalKernel log_normal
double pdf(double x)
Cauchy probability density function Used by DeterministicKernel to determine location of spread.
Dispersal kernel for deterministic spread to cell with highest probability of spread.
@ Weibull
Weibull dispersal kernel.
double pdf(double x)
Hyperbolic secant probability density function Used by DeterministicKernel to determine location of s...
Dispersal kernel for exponential power distribution class utilized by RadialKernel and DeterministicK...
double icdf(double x)
Exponential Power inverse cumulative distribution (quantile) function Used by DeterministicKernel to ...
@ ExponentialPower
Exponential power dispersal kernel.
double north_south_resolution
double icdf(double x)
Exponential inverse cumulative distribution (quantile) function Used by DeterministicKernel to determ...
Dispersal kernel for cauchy distribution class utilized by RadialKernel and DeterministicKernel.
double pdf(double x)
Logistic probability density function Used by DeterministicKernel to determine location of spread.
Raster< double > probability
double east_west_resolution
@ Normal
Normal dispersal kernel.
double pdf(double x)
Gamma probability density function Used by DeterministicKernel to determine location of spread.
DispersalKernelType
Type of dispersal kernel.
Dispersal kernel for logistic distribution class utilized by RadialKernel and DeterministicKernel.
double pdf(double x)
Normal probability density function Used by DeterministicKernel to determine location of spread.
#define UNUSED(expr)
Macro to mark unused variables (including parameters) and silence the warning while documenting that ...
@ Cauchy
Cauchy dispersal kernel.
HyperbolicSecantKernel hyperbolic_secant
double icdf(double x)
Normal inverse cumulative distribution (quantile) function Used by DeterministicKernel to determine m...
@ PowerLaw
Power law dispersal kernel.
double icdf(double x)
Logistic inverse cumulative distribution (quantile) function Used by DeterministicKernel to determine...
ExponentialKernel exponential
Dispersal kernel for power law distribution class utilized by RadialKernel and DeterministicKernel.
@ LogNormal
Log-normal dispersal kernel.
double proportion_of_dispersers
static bool supports_kernel(const DispersalKernelType type)
Returns true if the kernel class support a given kernel type.
double pdf(double x)
Log normal probability density function Used by DeterministicKernel to determine location of spread.
Dispersal kernel for log normal distribution class utilized by RadialKernel and DeterministicKernel.
Dispersal kernel for exponential distribution class utilized by RadialKernel and DeterministicKernel.
double icdf(double x)
Log normal inverse cumulative distribution (quantile) function Used by DeterministicKernel to determi...
double icdf(double x)
Cauchy inverse cumulative distribution (quantile) function Used by DeterministicKernel to determine m...
Dispersal kernel for normal distribution class utilized by RadialKernel and DeterministicKernel.
double pdf(double x)
Exponential probability density function Used by DeterministicKernel to determine location of spread.
double pdf(double x)
Weibull probability density function Used by DeterministicKernel to determine location of spread.
Dispersal kernel for hyperbolic secant class utilized by RadialKernel and DeterministicKernel.
double icdf(double x)
Weibull inverse cumulative distribution (quantile) function Used by DeterministicKernel to determine ...
double pdf(double x)
Power law probability density function Used by DeterministicKernel to determine location of spread.
const IntegerRaster & dispersers_
Kernel types enum and helper functions.
Dispersal kernel for gamma distribution class utilized by RadialKernel and DeterministicKernel.
double icdf(double x)
Gamma inverse cumulative distribution (quantile) function Used by DeterministicKernel to determine ma...