Class PolygonFrechetDistance


  • public class PolygonFrechetDistance
    extends Object
    Version:
    Jul 15, 2016
    Author:
    Mohamed Sherif (sherif@informatik.uni-leipzig.de)
    • Field Detail

      • a

        public double[][] a
      • b

        public double[][] b
      • c

        public double[][] c
      • d

        public double[][] d
    • Constructor Detail

      • PolygonFrechetDistance

        public PolygonFrechetDistance​(Polygon p1,
                                      Polygon p2)
        Constructor
        Parameters:
        p1 - Polygon
        p2 - Polygon
    • Method Detail

      • computeFrechetDistance

        public double computeFrechetDistance()
        Returns:
        Frechet distance
      • getFrechetPointToPolygonDistance

        public double getFrechetPointToPolygonDistance​(Point p,
                                                       Polygon poly)
        Parameters:
        p - Point
        poly - Polygon
        Returns:
        Frechet distance between the point p and the polygon poly
      • computeCriticalValues

        public Double[] computeCriticalValues()
        Returns:
        critical values
      • binarySearch

        public int binarySearch​(Double[] a)
        Performs the standard binary search using two comparisons per level.
        Parameters:
        a - array to carry out binary search in it
        Returns:
        index where item is found, or NOT_FOUND.
      • isFrechet

        public boolean isFrechet​(double epsilon)