MLPACK  1.0.11
example_kernel.hpp
Go to the documentation of this file.
1 
23 #ifndef __MLPACK_CORE_KERNELS_EXAMPLE_KERNEL_HPP
24 #define __MLPACK_CORE_KERNELS_EXAMPLE_KERNEL_HPP
25 
26 #include <mlpack/core.hpp>
27 
28 namespace mlpack {
29 
54 namespace kernel {
55 
95 {
96  public:
104 
116  template<typename VecType>
117  static double Evaluate(const VecType& a, const VecType& b) { return 0; }
118 
124  std::string ToString() const
125  {
126  std::ostringstream convert;
127  convert << "ExampleKernel [" << this << "]" << std::endl;
128  return convert.str();
129  }
130 
143  template<typename VecType>
144  static double ConvolutionIntegral(const VecType& a, const VecType& b)
145  { return 0; }
146 
157  static double Normalizer() { return 0; }
158 
159  // Modified to remove unused variable "dimension"
160  //static double Normalizer(size_t dimension=1) { return 0; }
161 
162 };
163 
164 }; // namespace kernel
165 }; // namespace mlpack
166 
167 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: load.hpp:31
std::string ToString() const
Returns a string for the kernel object; in this case, with only the memory address for the kernel...
static double Evaluate(const VecType &a, const VecType &b)
Evaluates the kernel function for two given vectors.
static double ConvolutionIntegral(const VecType &a, const VecType &b)
Obtains the convolution integral [integral K(||x-a||)K(||b-x||)dx] for the two vectors.
An example kernel function.
static double Normalizer()
Obtains the normalizing volume for the kernel with dimension $dimension$.
ExampleKernel()
The default constructor, which takes no parameters.