MLPACK  1.0.4
epanechnikov_kernel.hpp
Go to the documentation of this file.
00001 
00022 #ifndef __MLPACK_CORE_KERNELS_EPANECHNIKOV_KERNEL_HPP
00023 #define __MLPACK_CORE_KERNELS_EPANECHNIKOV_KERNEL_HPP
00024 
00025 #include <mlpack/core.hpp>
00026 
00027 namespace mlpack {
00028 namespace kernel {
00029 
00039 class EpanechnikovKernel
00040 {
00041  public:
00047   EpanechnikovKernel(const double bandwidth = 1.0) :
00048       bandwidth(bandwidth),
00049       inverseBandwidthSquared(1.0 / (bandwidth * bandwidth))
00050   {  }
00051 
00058   template<typename Vec1Type, typename Vec2Type>
00059   double Evaluate(const Vec1Type& a, const Vec2Type& b);
00060 
00070   template<typename VecType>
00071   double ConvolutionIntegral(const VecType& a, const VecType& b);
00072 
00078   double Normalizer(const size_t dimension);
00079 
00083   double Evaluate(const double t);
00084 
00085  private:
00087   double bandwidth;
00089   double inverseBandwidthSquared;
00090 };
00091 
00092 }; // namespace kernel
00093 }; // namespace mlpack
00094 
00095 // Include implementation.
00096 #include "epanechnikov_kernel_impl.hpp"
00097 
00098 #endif