mlpack  2.0.1
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 
39 namespace kernel {
40 
80 {
81  public:
89 
103  template<typename VecTypeA, typename VecTypeB>
104  static double Evaluate(const VecTypeA& /* a */, const VecTypeB& /* b */)
105  { return 0; }
106 
111  template<typename Archive>
112  void Serialize(Archive& /* ar */, const unsigned int /* version */) { }
113 
128  template<typename VecTypeA, typename VecTypeB>
129  static double ConvolutionIntegral(const VecTypeA& /* a */,
130  const VecTypeB& /* b */) { return 0; }
131 
142  static double Normalizer() { return 0; }
143 
144  // Modified to remove unused variable "dimension"
145  //static double Normalizer(size_t dimension=1) { return 0; }
146 };
147 
148 } // namespace kernel
149 } // namespace mlpack
150 
151 #endif
static double Evaluate(const VecTypeA &, const VecTypeB &)
Evaluates the kernel function for two given vectors.
static double ConvolutionIntegral(const VecTypeA &, const VecTypeB &)
Obtains the convolution integral [integral K(||x-a||)K(||b-x||)dx] for the two vectors.
Linear algebra utility functions, generally performed on matrices or vectors.
An example kernel function.
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
static double Normalizer()
Obtains the normalizing volume for the kernel with dimension $dimension$.
ExampleKernel()
The default constructor, which takes no parameters.
void Serialize(Archive &, const unsigned int)
Serializes the kernel.