empty : SAME ;
-- The empty range!
is_empty : BOOL ;
-- This routine returns true if and only if self is an empty range.
contains(
val : NTP
) : BOOL ;
-- This routine returns true iff val lies within the range.
offset(
range_val : NTP
) : NTP ;
-- This routine returns the value of range_val as an offset from zero,
-- taking into account the range low limit.
first : NTP ;
-- This routine returns the lowest value in the range provided that
-- the range is not empty.
last : NTP ;
-- This routine returns the highest value in the range provided that
-- the range is not empty.
is_disjoint(
other : $RANGE{NTP}
) : BOOL ;
-- This predicate returns true if and only if self and other do not
-- overlap.
is_intersecting(
other : $RANGE{NTP}
) : BOOL ;
-- This predicate returns true if and only if the ranges of other and
-- self have one or more common values.
is_adjacent(
other : $RANGE{NTP}
) : BOOL ;
-- This predicate returns true if and only if self and other are
-- adjacent or intersecting.
intersection(
other : $RANGE{NTP}
) : SAME ;
-- This feature returns the intersection of self and other unless they
-- are disjoint when the empty range is returned..
union(
other : $RANGE{NTP}
) : SAME ;
-- This feature returns the union of self and other provided that they
-- are not disjoint, when the empty range shall be returned.
merge(
other : $RANGE{NTP}
) : SAME ;
-- This routine returns the union of self and other providing they are
-- adjacent or intersecting, otherwise the empty range.
rev! : NTP ;
-- This iter feature yields all of the values of self from high - 1
-- down to and including low in turn.