MLPACK  1.0.7
ip_metric.hpp
Go to the documentation of this file.
1 
23 #ifndef __MLPACK_METHODS_FASTMKS_IP_METRIC_HPP
24 #define __MLPACK_METHODS_FASTMKS_IP_METRIC_HPP
25 
26 namespace mlpack {
27 namespace metric {
28 
29 template<typename KernelType>
30 class IPMetric
31 {
32  public:
34  IPMetric();
35 
37  IPMetric(KernelType& kernel);
38 
40  ~IPMetric();
41 
45  template<typename Vec1Type, typename Vec2Type>
46  double Evaluate(const Vec1Type& a, const Vec2Type& b);
47 
49  const KernelType& Kernel() const { return kernel; }
51  KernelType& Kernel() { return kernel; }
52 
53  private:
55  KernelType* localKernel;
57  KernelType& kernel;
58 };
59 
60 }; // namespace metric
61 }; // namespace mlpack
62 
63 // Include implementation.
64 #include "ip_metric_impl.hpp"
65 
66 #endif