Class Entry<T>

    • Field Detail

      • min

        protected double[] min
      • max

        protected double[] max
    • Constructor Detail

      • Entry

        public Entry​(double[] min,
                     double[] max,
                     T val)
    • Method Detail

      • lower

        public double[] lower()
        Specified by:
        lower in interface RectangleEntry<T>
        Returns:
        The lower left corner of the entry.
      • upper

        public double[] upper()
        Specified by:
        upper in interface RectangleEntry<T>
        Returns:
        The upper right corner of the entry.
      • value

        public T value()
        Specified by:
        value in interface RectangleEntry<T>
        Returns:
        The value associated with the rectangle or point.
      • 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()
      • setToCover

        public void setToCover​(Entry<T> e1,
                               Entry<T> e2)
      • calcVolume

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

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

        public static void calcBoundingBox​(Entry<?>[] 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,
                                           Entry<?> e)
      • calcIncludes

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

        public static double calcDeadspace​(Entry<?>[] 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​(Entry<?> e1,
                                                Entry<?> e2)
      • set

        protected void set​(Entry<T> e)
      • set

        public void set​(double[] lower,
                        double[] upper,
                        T val)