public class ManhattanDistance extends Object implements DistanceMeasure
Constructor and Description |
---|
ManhattanDistance() |
Modifier and Type | Method and Description |
---|---|
double |
compute(double[] a,
double[] b)
Compute the distance between two n-dimensional vectors.
|
public double compute(double[] a, double[] b)
The two vectors are required to have the same dimension.
compute
in interface DistanceMeasure
a
- the first vectorb
- the second vectorCopyright © 2003-2017 The Apache Software Foundation. All Rights Reserved.