org.apache.commons.math4.ml.distance

Interface DistanceMeasure

• Method Summary

All Methods
Modifier and Type Method and Description
double compute(double[] a, double[] b)
Compute the distance between two n-dimensional vectors.
• Method Detail

• compute

double compute(double[] a,
double[] b)
throws DimensionMismatchException
Compute the distance between two n-dimensional vectors.

The two vectors are required to have the same dimension.

Parameters:
a - the first vector
b - the second vector
Returns:
the distance between the two vectors
Throws:
DimensionMismatchException - if the array lengths differ.