Class ChebyshevDistance
java.lang.Object
smile.math.distance.ChebyshevDistance
- All Implemented Interfaces:
Serializable, ToDoubleBiFunction<double[],double[]>, Distance<double[]>, Metric<double[]>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubled(double[] x, double[] y) Chebyshev distance between the two arrays of type double.static doubled(float[] x, float[] y) Chebyshev distance between the two arrays of type float.static doubled(int[] x, int[] y) Chebyshev distance between the two arrays of type integer.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Distance
apply, applyAsDouble, pdist, pdist
-
Constructor Details
-
ChebyshevDistance
public ChebyshevDistance()Constructor.
-
-
Method Details
-
toString
-
d
public static double d(int[] x, int[] y) Chebyshev distance between the two arrays of type integer.- Parameters:
x- a vector.y- a vector.- Returns:
- the distance.
-
d
public static double d(float[] x, float[] y) Chebyshev distance between the two arrays of type float. NaN will be treated as missing values and will be excluded from the calculation.- Parameters:
x- a vector.y- a vector.- Returns:
- the distance.
-
d
-