pops-core
0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
|
Go to the documentation of this file.
16 #ifndef POPS_EXPONENTIAL_POWER_KERNEL_HPP
17 #define POPS_EXPONENTIAL_POWER_KERNEL_HPP
45 throw std::invalid_argument(
46 "alpha and beta must greater than or equal to 0");
56 template<
class Generator>
83 if (x <= 0 || x >= 1) {
84 throw std::invalid_argument(
"icdf: x must be between 0.0 and 1.0");
86 float sign = ((x - 0.5) > 0) ? 1.0 : ((x - 0.5) < 0 ? -1.0 : 0);
91 double gamma = gamma_distribution.
icdf(2 * std::abs(x - 0.5));
92 return sign * pow(gamma, 1.0 /
beta);
98 #endif // POPS_EXPONENTIAL_POWER_KERNEL_HPP
double pdf(double x)
Exponential Power probability density function Used by DeterministicKernel to determine location of s...
std::uniform_real_distribution< double > distribution
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 ...
double random(Generator &generator)
Returns random value from exponential power distribution Used by RadialKernel to determine location o...
ExponentialPowerKernel(double a, double b)
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...