interval_overlaps

static IntervalTree.interval_overlaps(interval1, interval2)[source]

Checks whether two intervals overlap each other.

Parameters:
  • interval1 – A tuple of two numbers: the lower and higher bound of the first interval.

  • interval2 – A tuple of two numbers: the lower and higher bound of the second interval.

Returns:

True if the intervals overlap.