MLPACK  1.0.11
epanechnikov_kernel.hpp
Go to the documentation of this file.
1 
22 #ifndef __MLPACK_CORE_KERNELS_EPANECHNIKOV_KERNEL_HPP
23 #define __MLPACK_CORE_KERNELS_EPANECHNIKOV_KERNEL_HPP
24 
25 #include <mlpack/core.hpp>
26 
27 namespace mlpack {
28 namespace kernel {
29 
40 {
41  public:
47  EpanechnikovKernel(const double bandwidth = 1.0) :
50  { }
51 
58  template<typename Vec1Type, typename Vec2Type>
59  double Evaluate(const Vec1Type& a, const Vec2Type& b) const;
60 
65  double Evaluate(const double distance) const;
66 
77  template<typename VecType>
78  double ConvolutionIntegral(const VecType& a, const VecType& b);
79 
85  double Normalizer(const size_t dimension);
86 
87  // Returns String of O bject
88  std::string ToString() const;
89 
90  private:
92  double bandwidth;
95 
96 };
97 
99 template<>
101 {
102  public:
104  static const bool IsNormalized = true;
105 };
106 
107 }; // namespace kernel
108 }; // namespace mlpack
109 
110 // Include implementation.
111 #include "epanechnikov_kernel_impl.hpp"
112 
113 #endif