Class IntervalUtils


  • public class IntervalUtils
    extends java.lang.Object
    • Constructor Detail

      • IntervalUtils

        public IntervalUtils()
    • Method Detail

      • remove_empty_intervals

        protected static IntervalList remove_empty_intervals​(IntervalList L)
        Computes the list I produced by removing empty intervals from the list L.
        Parameters:
        L -
        Returns:
        I
      • union_all

        public static IntervalList union_all​(java.util.List<IntervalList> L)
        Computes the list I of maximal intervals produced by the union of the lists of maximal intervals of list L. L is allowed to be empty, contain empty lists and contain empty intervals in any of the lists.
        Parameters:
        L -
        Returns:
        I
      • intersect_all

        public static IntervalList intersect_all​(java.util.List<IntervalList> L)
        Computes the list of maximal intervals I such that I is the intersection of the lists of intervals of list L. L is allowed to be empty, contain empty lists, or contain empty intervals in any of the lists.
        Parameters:
        L -
        Returns:
        I
      • intersect

        protected static IntervalList intersect​(IntervalList head,
                                                java.util.List<IntervalList> tail)
        Computes the list of maximal intervals I such that I is the intersection between the head and every element of the tail. Head and tail are allowed to be empty or contain empty intervals.
        Parameters:
        head -
        tail -
        Returns:
        I
      • intersect

        protected static IntervalList intersect​(IntervalList L1,
                                                IntervalList L2)
        Computes the list of maximal intervals I such that I is the intersection between the two lists of intervals L1 and L2. L1 and L2 are allowed to be empty or contain empty intervals.
        Parameters:
        L1 -
        L2 -
        Returns:
        I
      • intersect

        protected static Interval intersect​(Interval i,
                                            Interval j)
        Computes the interval x representing the intersection between two intervals i and j. The intervals i and j are allowed to be empty or open-ended, but need to be closed-open intervals.
        Parameters:
        i -
        j -
        Returns:
        x
      • relative_complement_all

        public static IntervalList relative_complement_all​(IntervalList Iprime,
                                                           java.util.List<IntervalList> L)
        Computes the list of maximal intervals I such that I is the relative complement of the list of maximal intervals J with respect to the maximal intervals of list L.
        Parameters:
        Iprime -
        L -
        Returns:
        I
      • minus

        protected static IntervalList minus​(IntervalList I,
                                            IntervalList J)
        Computes the list of maximal intervals M such that M = I / J. J is assumed not to have any overlapping intervals (since the origin is usually the union of a List<<IntervalList>.
        Parameters:
        I -
        J -
        Returns:
        M
      • textToInterval

        public static Interval textToInterval​(java.lang.String text)
      • textToIntervalList

        public static IntervalList textToIntervalList​(java.lang.String text)
      • textToListOfIntervalList

        public static java.util.List<IntervalList> textToListOfIntervalList​(java.lang.String text)