pops-core  0.9
PoPS (Pest or Pathogen Spread) Model Core C++ library
Namespaces | Enumerations | Functions
kernel_types.hpp File Reference

Kernel types enum and helper functions. More...

#include <string>
#include <stdexcept>
Include dependency graph for kernel_types.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 pops
 

Enumerations

enum  pops::DispersalKernelType {
  pops::DispersalKernelType::Cauchy, pops::DispersalKernelType::Exponential, pops::DispersalKernelType::Uniform, pops::DispersalKernelType::DeterministicNeighbor,
  pops::DispersalKernelType::PowerLaw, pops::DispersalKernelType::HyperbolicSecant, pops::DispersalKernelType::Gamma, pops::DispersalKernelType::ExponentialPower,
  pops::DispersalKernelType::Weibull, pops::DispersalKernelType::Normal, pops::DispersalKernelType::LogNormal, pops::DispersalKernelType::Logistic,
  pops::DispersalKernelType::Network, pops::DispersalKernelType::None
}
 Type of dispersal kernel. More...
 

Functions

DispersalKernelType pops::kernel_type_from_string (const std::string &text)
 Get a corresponding enum value for a string which is a kernel name. More...
 
DispersalKernelType pops::kernel_type_from_string (const char *text)
 Overload which allows to pass C-style string which is nullptr (NULL) More...
 

Detailed Description

Kernel types enum and helper functions.

This file contains general functionality shared in general by all kernels.

An alternative implementation would be for each class to maintain its own enum of supported kernels, potentially creating a hierarchy of kernel types and subtypes. This would avoid the need for a separate header file such as this one due to all kernels potentially depending on it which prevents us from having it in the same header file like the main or default interface. However, this is easier for actually using the library as all kernel types are resolved by one function and one variable in the user code.

Definition in file kernel_types.hpp.