Expand description
RangeSet
container type.
RangeSet
stores collections of PrimInt
values as inclusive ranges using
generic SmallVec
-backed storage. This means
that a certain amount of ranges will fit on the stack before spilling over
to the heap.
Re-exports
pub use range_compare::RangeCompare;
pub use range_compare::RangeDisjoint;
pub use range_compare::RangeIntersect;
pub use range_compare::range_compare;
pub use range_compare::intersection;
Modules
- Type and functions for comparing inclusive ranges
Macros
- Convenient macro to construct RangeSets without needing bulky notation like
::<[RangeInclusive<_>; _]>
. The macro allows a mix of numbers and inclusive ranges, with an optional length at the end for the smallvec array size. If the length is not specified, it will default to 4.
Structs
- Iterates over elements of the
RangeSet
- A set of primitive integers represented as a sorted list of disjoint, inclusive ranges.
Constants
- The default size of the inner smallvec’s on-stack array.
Functions
- Report some sizes of various range set types
- Tests a slice of ranges for validity as a range set: the element ranges must be properly disjoint (not adjacent) and sorted.