Class AngularInterval.Convex

  • All Implemented Interfaces:
    HyperplaneBoundedRegion<Point1S>, Splittable<Point1S,​HyperplaneBoundedRegion<Point1S>>, Region<Point1S>, Sized
    Enclosing class:
    AngularInterval

    public static final class AngularInterval.Convex
    extends AngularInterval
    Class representing an angular interval with the additional property that the region is convex. By convex, it is meant that the shortest path between any two points in the region is also contained entirely in the region. If there is a tie for shortest path, then it is sufficient that at least one lie entirely within the region. For spherical 1D space, this means that the angular interval is either completely full or has a length less than or equal to pi.
    • Constructor Detail

      • Convex

        private Convex​(CutAngle minBoundary,
                       CutAngle maxBoundary)
        Construct a new convex instance from its boundaries and midpoint. No validation of the argument is performed. Callers are responsible for ensuring that the size of interval is less than or equal to pi.
        Parameters:
        minBoundary - minimum boundary for the interval
        maxBoundary - maximum boundary for the interval
        Throws:
        java.lang.IllegalArgumentException - if the interval is not convex
    • Method Detail

      • transform

        public AngularInterval.Convex transform​(Transform<Point1S> transform)
        Return a new instance transformed by the argument. If the transformed size of the interval is greater than or equal to 2pi, then an interval representing the full space is returned.
        Overrides:
        transform in class AngularInterval
        Parameters:
        transform - transform to apply
        Returns:
        a new instance transformed by the argument
      • splitDiameter

        public Split<AngularInterval.Convex> splitDiameter​(CutAngle splitter)
        Split the instance along a circle diameter.The diameter is defined by the given split point and its reversed antipodal point.
        Parameters:
        splitter - split point defining one side of the split diameter
        Returns:
        result of the split operation
      • of

        public static AngularInterval.Convex of​(double min,
                                                double max,
                                                org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
        Return an instance representing the convex angular interval between the given min and max azimuth values. The max value is adjusted to be numerically above the min value, even if the resulting azimuth value is greater than or equal to 2pi. An instance representing the full space is returned if either point is infinite or min and max are equivalent as evaluated by the given precision context.
        Parameters:
        min - min azimuth value
        max - max azimuth value
        precision - precision precision context used to compare floating point values
        Returns:
        a new instance resulting the angular region between the given min and max azimuths
        Throws:
        java.lang.IllegalArgumentException - if either azimuth is infinite or NaN, or the given angular interval is not convex (meaning it has a size of greater than pi)
      • of

        public static AngularInterval.Convex of​(Point1S min,
                                                Point1S max,
                                                org.apache.commons.numbers.core.Precision.DoubleEquivalence precision)
        Return an instance representing the convex angular interval between the given min and max azimuth points. The max point is adjusted to be numerically above the min point, even if the resulting azimuth value is greater than or equal to 2pi. An instance representing the full space is returned if either point is infinite or min and max are equivalent as evaluated by the given precision context.
        Parameters:
        min - min azimuth value
        max - max azimuth value
        precision - precision precision context used to compare floating point values
        Returns:
        a new instance resulting the angular region between the given min and max points
        Throws:
        java.lang.IllegalArgumentException - if either azimuth is infinite or NaN, or the given angular interval is not convex (meaning it has a size of greater than pi)
      • of

        public static AngularInterval.Convex of​(CutAngle a,
                                                CutAngle b)
        Return an instance representing the convex angular interval between the given oriented points. The negative-facing point is used as the minimum boundary and the positive-facing point is adjusted to be above the minimum. The arguments can be given in any order. The full space is returned if the points are equivalent or are oriented in the same direction.
        Parameters:
        a - first oriented point
        b - second oriented point
        Returns:
        an instance representing the angular interval between the given oriented points
        Throws:
        java.lang.IllegalArgumentException - if either azimuth is infinite or NaN, or the given angular interval is not convex (meaning it has a size of greater than pi)