Class BoxDistance.RectangleDist

  • All Implemented Interfaces:
    BoxDistance
    Enclosing interface:
    BoxDistance

    public static class BoxDistance.RectangleDist
    extends Object
    implements BoxDistance
    This class calculates the distance to a rectangular shaped object.

    This class completely ignores the center given as parameter to the interface. TODO: maybe we could get rid of the center parameter altogether and always let the RectangleDistanceFunction hold it's reference points?

    • Constructor Detail

      • RectangleDist

        public RectangleDist​(double[] lower,
                             double[] upper)
    • Method Detail

      • dist

        public double dist​(double[] ignored,
                           double[] min,
                           double[] max)
        Specified by:
        dist in interface BoxDistance
        Parameters:
        ignored - A point
        min - Minimum corner of axis aligned box
        max - Maximum corner of axis aligned box
        Returns:
        Distance between point and box