mlpack  1.0.12
example_kernel.hpp
Go to the documentation of this file.
1 
15 #ifndef __MLPACK_CORE_KERNELS_EXAMPLE_KERNEL_HPP
16 #define __MLPACK_CORE_KERNELS_EXAMPLE_KERNEL_HPP
17 
18 #include <mlpack/core.hpp>
19 
20 namespace mlpack {
21 
46 namespace kernel {
47 
87 {
88  public:
96 
108  template<typename VecType>
109  static double Evaluate(const VecType& a, const VecType& b) { return 0; }
110 
116  std::string ToString() const
117  {
118  std::ostringstream convert;
119  convert << "ExampleKernel [" << this << "]" << std::endl;
120  return convert.str();
121  }
122 
135  template<typename VecType>
136  static double ConvolutionIntegral(const VecType& a, const VecType& b)
137  { return 0; }
138 
149  static double Normalizer() { return 0; }
150 
151  // Modified to remove unused variable "dimension"
152  //static double Normalizer(size_t dimension=1) { return 0; }
153 
154 };
155 
156 }; // namespace kernel
157 }; // namespace mlpack
158 
159 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: load.hpp:23
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.