Class ChebyshevDistance
- java.lang.Object
-
- org.apache.commons.math4.legacy.ml.distance.ChebyshevDistance
-
- All Implemented Interfaces:
DistanceMeasure
public class ChebyshevDistance extends Object implements DistanceMeasure
Calculates the L∞ (max of abs) distance between two points.- Since:
- 3.2
-
-
Constructor Summary
Constructors Constructor Description ChebyshevDistance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
compute(double[] a, double[] b)
Compute the distance between two n-dimensional vectors.
-
-
-
Constructor Detail
-
ChebyshevDistance
public ChebyshevDistance()
-
-
Method Detail
-
compute
public double compute(double[] a, double[] b)
Compute the distance between two n-dimensional vectors.The two vectors are required to have the same dimension.
- Specified by:
compute
in interfaceDistanceMeasure
- Parameters:
a
- the first vectorb
- the second vector- Returns:
- the distance between the two vectors
-
-