Module range_set

Source
Expand description

Stores a disjoint collection of ranges over numeric types.

Overlapping and adjacent ranges are automatically merged together.

Structsยง

IntersectionIter ๐Ÿ”’
RangeSet
A set of disjoint ranges over numeric types.

Traitsยง

OrdAdjacency
Allows a two values to be tested for adjacency.

Functionsยง

range_intersection ๐Ÿ”’
If a and b intersect return a range representing the intersection.
range_is_subset ๐Ÿ”’
Returns true if the range [a_start, a_end] is a subset of [b_start, b_end].
ranges_overlap_or_adjacent ๐Ÿ”’
Returns true if the ranges [a_start, a_end] and [b_start, b_end] overlap or are adjacent to each other.