pops-core
0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
|
Go to the documentation of this file.
16 #ifndef POPS_EXPONENTIAL_KERNEL_HPP
17 #define POPS_EXPONENTIAL_KERNEL_HPP
43 throw std::invalid_argument(
"beta must be greater than 0.0");
53 template<
class Generator>
68 throw std::invalid_argument(
"x must be greater than or equal to zero");
70 return (1.0 /
beta) * (exp(-x /
beta));
81 if (x <= 0 || x >= 1) {
82 throw std::invalid_argument(
"icdf: x must be between 0.0 and 1.0");
85 return -
beta * log(1 - x);
92 #endif // POPS_EXPONENTIAL_KERNEL_HPP
std::exponential_distribution< double > exponential_distribution
double icdf(double x)
Exponential inverse cumulative distribution (quantile) function Used by DeterministicKernel to determ...
ExponentialKernel(double b)
double random(Generator &generator)
Returns random value from exponential distribution Used by RadialKernel to determine location of spre...
Dispersal kernel for exponential distribution class utilized by RadialKernel and DeterministicKernel.
double pdf(double x)
Exponential probability density function Used by DeterministicKernel to determine location of spread.
Kernel types enum and helper functions.