Class Distance
java.lang.Object
org.ojalgo.data.proximity.Distance
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleangular(float[] a, float[] b) static doublecanberra(float[] a, float[] b) static doublechebyshev(float[] a, float[] b) static doublecorrelation(float[] a, float[] b) static doublecosine(double[] a, double[] b) Cosine distance = 1 - cosine similarity.static doublecosine(float[] a, float[] b) static doubleCosine distance for matrices = 1 - cosine similarity.static doubleeuclidean(float[] a, float[] b) static doublehamming(float[] a, float[] b) static doublehellinger(float[] a, float[] b) static doublejaccard(float[] a, float[] b) static doublemanhattan(float[] a, float[] b) static doublesquaredEuclidean(float[] a, float[] b)
-
Constructor Details
-
Distance
public Distance()
-
-
Method Details
-
angular
public static double angular(float[] a, float[] b) -
canberra
public static double canberra(float[] a, float[] b) -
chebyshev
public static double chebyshev(float[] a, float[] b) -
correlation
public static double correlation(float[] a, float[] b) -
cosine
-
cosine
public static double cosine(double[] a, double[] b) Cosine distance = 1 - cosine similarity. Range [0, 2]. -
cosine
public static double cosine(float[] a, float[] b) -
euclidean
public static double euclidean(float[] a, float[] b) -
hamming
public static double hamming(float[] a, float[] b) -
hellinger
public static double hellinger(float[] a, float[] b) -
jaccard
public static double jaccard(float[] a, float[] b) -
manhattan
public static double manhattan(float[] a, float[] b) -
squaredEuclidean
public static double squaredEuclidean(float[] a, float[] b)
-