17 #ifndef __MLPACK_CORE_METRICS_LMETRIC_HPP 18 #define __MLPACK_CORE_METRICS_LMETRIC_HPP 64 template<
int TPower,
bool TTakeRoot = true>
84 template<
typename VecTypeA,
typename VecTypeB>
85 static double Evaluate(
const VecTypeA& a,
const VecTypeB& b);
88 template<
typename Archive>
92 static const int Power = TPower;
125 #include "lmetric_impl.hpp" Linear algebra utility functions, generally performed on matrices or vectors.
LMetric< 2, true > EuclideanDistance
The Euclidean (L2) distance.
LMetric< 2, false > SquaredEuclideanDistance
The squared Euclidean (L2) distance.
void Serialize(Archive &, const unsigned int)
Serialize the metric (nothing to do).
LMetric< 1, false > ManhattanDistance
The Manhattan (L1) distance.
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
The L_p metric for arbitrary integer p, with an option to take the root.
static const int Power
The power of the metric.
LMetric< INT_MAX, false > ChebyshevDistance
The L-infinity distance.
static double Evaluate(const VecTypeA &a, const VecTypeB &b)
Computes the distance between two points.
static const bool TakeRoot
Whether or not the root is taken.