lmetric.hpp File Reference
Include dependency graph for lmetric.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  LMetric< TPower, TTakeRoot >
 The L_p metric for arbitrary integer p, with an option to take the root. More...





typedef LMetric< INT_MAX, false > ChebyshevDistance
 The L-infinity distance. More...

typedef LMetric< 2, true > EuclideanDistance
 The Euclidean (L2) distance. More...

typedef LMetric< 1, false > ManhattanDistance
 The Manhattan (L1) distance. More...

typedef LMetric< 2, false > SquaredEuclideanDistance
 The squared Euclidean (L2) distance. More...


Detailed Description

Ryan Curtin

Generalized L-metric, allowing both squared distances to be returned as well as non-squared distances. The squared distances are faster to compute.

This also gives several convenience typedefs for commonly used L-metrics.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.

Definition in file lmetric.hpp.