MLPACK  1.0.7
lmetric.hpp
Go to the documentation of this file.
1 
25 #ifndef __MLPACK_CORE_METRICS_LMETRIC_HPP
26 #define __MLPACK_CORE_METRICS_LMETRIC_HPP
27 
28 #include <mlpack/core.hpp>
29 
30 namespace mlpack {
31 namespace metric {
32 
72 template<int Power, bool TakeRoot = true>
73 class LMetric
74 {
75  public:
76  /***
77  * Default constructor does nothing, but is required to satisfy the Kernel
78  * policy.
79  */
80  LMetric() { }
81 
85  template<typename VecType1, typename VecType2>
86  static double Evaluate(const VecType1& a, const VecType2& b);
87 };
88 
89 // Convenience typedefs.
90 
91 /***
92  * The Manhattan (L1) distance.
93  */
95 
96 /***
97  * The squared Euclidean (L2) distance.
98  */
100 
101 /***
102  * The Euclidean (L2) distance.
103  */
105 
106 /***
107  * The L-infinity distance
108  */
110 
111 }; // namespace metric
112 }; // namespace mlpack
113 
114 // Include implementation.
115 #include "lmetric_impl.hpp"
116 
117 #endif