pops-core
0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
|
Go to the documentation of this file.
16 #ifndef POPS_CAUCHY_KERNEL_HPP
17 #define POPS_CAUCHY_KERNEL_HPP
43 throw std::invalid_argument(
44 "CauchyKernel: scale (s) must be greater than 0.0");
54 template<
class Generator>
68 return 1 / ((
s *
M_PI) * (1 + (pow(x /
s, 2))));
79 if (x <= 0 || x >= 1) {
80 throw std::invalid_argument(
"icdf: x must be between 0.0 and 1.0");
82 return s * tan(
M_PI * (x - 0.5));
88 #endif // POPS_CAUCHY_KERNEL_HPP
double random(Generator &generator)
Returns random value from cauchy distribution Used by RadialKernel to determine location of spread.
double pdf(double x)
Cauchy probability density function Used by DeterministicKernel to determine location of spread.
Dispersal kernel for cauchy distribution class utilized by RadialKernel and DeterministicKernel.
CauchyKernel(double scale)
std::cauchy_distribution< double > cauchy_distribution
double icdf(double x)
Cauchy inverse cumulative distribution (quantile) function Used by DeterministicKernel to determine m...
Kernel types enum and helper functions.