is_normalized

Function is_normalized 

Source
pub fn is_normalized<T: Endpoint>(
    intervals: impl IntoIterator<Item: ClosedRange<EndT = T>>,
) -> bool
Expand description

Determines whether the input sequence is in normalized format:

  1. consists of valid intervals (start, stop) with start <= stop
  2. intervals are sorted by the start endpoint
  3. adjacent intervals are disjoint and separated by at least one Endpoint value

Checking this property takes time linear in the length of the input iterator.