- All Implemented Interfaces:
- Serializable, DistanceMeasure
public class ManhattanDistance
- extends Object
- implements DistanceMeasure
Calculates the L1 (sum of abs) distance between two points.
- $Id $
- See Also:
- Serialized Form
Compute the distance between two n-dimensional vectors.
|Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public double compute(double a,
- Compute the distance between two n-dimensional vectors.
The two vectors are required to have the same dimension.
- Specified by:
compute in interface
a - the first vector
b - the second vector
- the distance between the two vectors
Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.