Interface DistanceMeasure
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CanberraDistance
,ChebyshevDistance
,EarthMoversDistance
,EuclideanDistance
,ManhattanDistance
Interface for distance measures of n-dimensional vectors.
-
Method Summary
Modifier and TypeMethodDescriptiondouble
compute
(double[] a, double[] b) Compute the distance between two n-dimensional vectors.
-
Method Details
-
compute
Compute the distance between two n-dimensional vectors.The two vectors are required to have the same dimension.
- Parameters:
a
- the first vectorb
- the second vector- Returns:
- the distance between the two vectors
- Throws:
MathIllegalArgumentException
- if the array lengths differ.
-