Module ojalgo

Class Distance


  • public abstract class Distance
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Distance()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double angular​(float[] a, float[] b)  
      static double canberra​(float[] a, float[] b)  
      static double chebyshev​(float[] a, float[] b)  
      static double correlation​(float[] a, float[] b)  
      static double cosine​(double[] a, double[] b)
      Cosine distance = 1 - cosine similarity.
      static double cosine​(float[] a, float[] b)  
      static double cosine​(Access1D<?> a, Access1D<?> b)
      Cosine distance for matrices = 1 - cosine similarity.
      static double euclidean​(float[] a, float[] b)  
      static double hamming​(float[] a, float[] b)  
      static double hellinger​(float[] a, float[] b)  
      static double jaccard​(float[] a, float[] b)  
      static double manhattan​(float[] a, float[] b)  
      static double squaredEuclidean​(float[] a, float[] b)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Distance

        public Distance()
    • Method Detail

      • 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

        public static double cosine​(Access1D<?> a,
                                    Access1D<?> b)
        Cosine distance for matrices = 1 - cosine similarity.
      • 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)