Serializable, DistanceMeasurepublic class EuclideanDistance extends Object implements DistanceMeasure
| Constructor | Description |
|---|---|
EuclideanDistance() |
| Modifier and Type | Method | Description |
|---|---|---|
double |
compute(double[] a,
double[] b) |
Compute the distance between two n-dimensional vectors.
|
public double compute(double[] a,
double[] b)
throws DimensionMismatchException
The two vectors are required to have the same dimension.
compute in interface DistanceMeasurea - the first vectorb - the second vectorDimensionMismatchException - if the array lengths differ.Copyright © 2003–2017 The Apache Software Foundation. All rights reserved.