MLPACK  1.0.10
cosine_distance.hpp
Go to the documentation of this file.
1 
23 #ifndef __MLPACK_CORE_KERNELS_COSINE_DISTANCE_HPP
24 #define __MLPACK_CORE_KERNELS_COSINE_DISTANCE_HPP
25 
26 #include <mlpack/core.hpp>
27 
28 namespace mlpack {
29 namespace kernel {
30 
41 {
42  public:
50  template<typename VecType>
51  static double Evaluate(const VecType& a, const VecType& b);
52 
56  std::string ToString() const
57  {
58  std::ostringstream convert;
59  convert << "CosineDistance [" << this << "]" << std::endl;
60  return convert.str();
61  }
62 };
63 
65 template<>
67 {
68  public:
70  static const bool IsNormalized = true;
71 };
72 
73 }; // namespace kernel
74 }; // namespace mlpack
75 
76 // Include implementation.
77 #include "cosine_distance_impl.hpp"
78 
79 #endif