Class RTreeEntry<T>

    • Method Detail

      • createBox

        public static <T> RTreeEntry<T> createBox​(double[] min,
                                                  double[] max,
                                                  T value)
        Create a new entry based on an axis aligned box.
        Type Parameters:
        T - Value type
        Parameters:
        min - Box minimum
        max - Box maximum
        value - The value associated with the box.
        Returns:
        New BoxEntry
      • createPoint

        public static <T> RTreeEntry<T> createPoint​(double[] point,
                                                    T value)
        Create a new R-Tree entry based on a point coordinate.
        Type Parameters:
        T - Value type
        Parameters:
        point - The point.
        value - The value associated with the point.
        Returns:
        New PointEntry
      • checkInclusion

        public boolean checkInclusion​(double[] min2,
                                      double[] max2)
        Check whether the current entry geometrically includes the rectangle defined by min2 and max2.
        Parameters:
        min2 - Rectangle min
        max2 - Rectangle max
        Returns:
        Whether min2/max2 is included in the current entry.
      • checkExactMatch

        public boolean checkExactMatch​(double[] min2,
                                       double[] max2)
      • calcArea

        public double calcArea()
      • calcVolume

        public static double calcVolume​(RTreeEntry<?> e)
      • calcVolume

        public static double calcVolume​(double[] min,
                                        double[] max)
      • calcBoundingBox

        public static void calcBoundingBox​(RTreeEntry<?>[] entries,
                                           int start,
                                           int end,
                                           double[] minOut,
                                           double[] maxOut)
      • calcOverlap

        public static double calcOverlap​(double[] min1,
                                         double[] max1,
                                         double[] min2,
                                         double[] max2)
      • checkOverlap

        public static boolean checkOverlap​(double[] min,
                                           double[] max,
                                           RTreeEntry<?> e)
      • calcIncludes

        public static boolean calcIncludes​(double[] minOut,
                                           double[] maxOut,
                                           double[] minIn,
                                           double[] maxIn)
      • calcDeadspace

        public static double calcDeadspace​(RTreeEntry<?>[] entries,
                                           int start,
                                           int end,
                                           double[] minOut,
                                           double[] maxOut)
        Calculates the bounding boxes and the estimated dead space.
        Parameters:
        entries - Entries
        start - start
        end - end
        minOut - min return
        maxOut - max return
        Returns:
        estimated dead space
      • calcMargin

        public static double calcMargin​(double[] min2,
                                        double[] max2)
      • calcCenterDistance

        public static double calcCenterDistance​(RTreeEntry<?> e1,
                                                RTreeEntry<?> e2)