Interface PointDistance

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface PointDistance
    • Method Detail

      • dist

        double dist​(double[] p1,
                    double[] p2)
      • dist

        default double dist​(double[] p1,
                            Index.PointEntry<?> entry)
        Parameters:
        p1 - a point
        entry - another point
        Returns:
        distance between the points
      • l1

        static double l1​(double[] p1,
                         double[] p2)
        Manhattan/Taxi distance / L1.
        Parameters:
        p1 - point 1
        p2 - point 2
        Returns:
        distance
      • l2

        static double l2​(double[] p1,
                         double[] p2)
        Euclidean distance / L2.
        Parameters:
        p1 - point 1
        p2 - point 2
        Returns:
        distance