Crate rangelist

Source
Expand description

A library for working with set of values represented as inclusive ranges.

This library provides a RangeList struct that can be used to represent sets of values as a collection of inclusive ranges. The ranges are stored in a deduplicated sorted order.

Additionally, the library defines IntervalIterator trait to be implemented by types can provide an iterator of sorted inclusive ranges. Any combination of types that implement this trait can be used to perform standard set operations such as union and intersection.

Finally, the library provides DiffIter, IntersectIter, and UnionIter, which are lazy iterator combinators that can be used to perform set operations on two iterators of ordered ranges.

Structs§

DiffIter
An iterator combinator that given two iterators yielding ordered ranges, yields the ordered ranges of elements that are in the ranges yielded by lhs iterator, but does not include elements that are in the ranges yielded by the rhs iterator.
IntersectIter
An iterator combinator that given two iterators yielding ordered ranges, yields the ordered ranges that are in the intersection of the ranges yielded by the iterators.
RangeList
A sorted collection of inclusive ranges that can be used to represent non-continuous sets of values.
UnionIter
An iterator combinator that given two iterators yielding ordered ranges, yields the ordered ranges that are in the union of the ranges yielded by the iterators.

Traits§

IntervalIterator
A trait that provides operations on iterators of orderdered intervals.