Method ADT.Interval()->contains()

class ADT.Interval

Method contains

bool contains(RangeType|this_program(< RangeType >) x)

Description

Test membership of a value, or intersection with another interval.

For a plain value, test whether its closed, single-point interval intersects this interval. The endpoint limitations described in ADT.Interval apply, including at an open upper endpoint.

Note

When x is an interval, this method returns true for any nonempty intersection, just like overlaps(). It does not test whether the whole argument interval is contained.