STK++ 0.9.13

In this sub-project, we compute the usual positive kernels used by rkhs methods. More...

Collaboration diagram for Positive kernels.:

Classes

class  STK::Kernel::Gaussian< Array >
 The Gaussian Kernel is a kernel of the form. More...
 
class  STK::Kernel::Hamming< Array >
 The Hamming Kernel is a kernel of the form. More...
 
class  STK::Kernel::IKernel
 Interface class for the kernels classes. More...
 
class  STK::Kernel::IKernelBase< Array >
 Interface Base class for the kernels classes. More...
 
class  STK::Kernel::Laplace< Array >
 The Laplace Kernel is a kernel of the form. More...
 
class  STK::Kernel::Exponential< Array >
 [Deprecated] The Exponential Kernel is a kernel of the form More...
 
class  STK::Kernel::Linear< Array >
 The Linear Kernel is a kernel of the form. More...
 
class  STK::Kernel::Polynomial< Array >
 The Polynomial Kernel is a kernel of the form. More...
 
class  STK::Kernel::RationalQuadratic< Array >
 The RationalQuadratic Kernel is a kernel of the form. More...
 

Enumerations

enum  STK::Kernel::kernelType {
  STK::Kernel::laplace_ , STK::Kernel::exponential_ , STK::Kernel::gaussian_ , STK::Kernel::linear_ ,
  STK::Kernel::polynomial_ , STK::Kernel::rationalQuadratic_ , STK::Kernel::hamming_ , STK::Kernel::unknown_kernel_
}
 kernel types. More...
 

Functions

kernelType STK::Kernel::stringToKernelType (std::string const &type)
 Convert a String to a kernelType.
 
String STK::Kernel::kernelTypeToString (kernelType const &type)
 convert a kernelType to a String.
 

Detailed Description

In this sub-project, we compute the usual positive kernels used by rkhs methods.

Enumeration Type Documentation

◆ kernelType

kernel types.

Enumerator
laplace_ 
exponential_ 
gaussian_ 
linear_ 
polynomial_ 
rationalQuadratic_ 
hamming_ 
unknown_kernel_ 

Definition at line 49 of file STK_Kernel_Util.h.

Function Documentation

◆ kernelTypeToString()

String STK::Kernel::kernelTypeToString ( kernelType const type)
inline

convert a kernelType to a String.

Parameters
typethe type of kernelType we want to convert
Returns
the string associated to this type.

Definition at line 93 of file STK_Kernel_Util.h.

94{
95 if (type == exponential_) return String(_T("Exponential")); // deprecated
96 if (type == laplace_) return String(_T("Laplace"));
97 if (type == gaussian_) return String(_T("Gaussian"));
98 if (type == linear_) return String(_T("Linear"));
99 if (type == polynomial_) return String(_T("Polynomial"));
100 if (type == rationalQuadratic_) return String(_T("RationalQuadratic"));
101 if (type == hamming_) return String(_T("Hamming"));
102 return String(_T("unknown"));
103}
#define _T(x)
Let x unmodified.
std::basic_string< Char > String
STK fundamental type of a String.

References _T, STK::Kernel::exponential_, STK::Kernel::gaussian_, STK::Kernel::hamming_, STK::Kernel::laplace_, STK::Kernel::linear_, STK::Kernel::polynomial_, and STK::Kernel::rationalQuadratic_.

◆ stringToKernelType()

kernelType STK::Kernel::stringToKernelType ( std::string const type)
inline

Convert a String to a kernelType.

The recognized strings are

Kernel
"Laplace"
"Gaussian"
"Linear"
"Polynomial"
"RationalQuadratic"
"Hamming"
Parameters
typethe String we want to convert
Returns
the kernrlType represented by the String type. If the string does not match any known name, the unknown_kernel_ type is returned.

Definition at line 76 of file STK_Kernel_Util.h.

77{
78 if (toUpperString(type) == toUpperString(_T("Laplace"))) return laplace_;
79 if (toUpperString(type) == toUpperString(_T("Exponential"))) return exponential_;
80 if (toUpperString(type) == toUpperString(_T("Gaussian"))) return gaussian_;
81 if (toUpperString(type) == toUpperString(_T("Linear"))) return linear_;
82 if (toUpperString(type) == toUpperString(_T("Polynomial"))) return polynomial_;
83 if (toUpperString(type) == toUpperString(_T("RationalQuadratic"))) return rationalQuadratic_;
84 if (toUpperString(type) == toUpperString(_T("Hamming"))) return hamming_;
85 return unknown_kernel_;
86}
String const & toUpperString(String &s)
convert the characters of the String to upper case
Definition STK_String.h:134

References _T, STK::Kernel::exponential_, STK::Kernel::gaussian_, STK::Kernel::hamming_, STK::Kernel::laplace_, STK::Kernel::linear_, STK::Kernel::polynomial_, STK::Kernel::rationalQuadratic_, STK::toUpperString(), and STK::Kernel::unknown_kernel_.

Referenced by STK::KernelHandler::addKernel().