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§
- range_
compare - Type and functions for comparing inclusive ranges
Macros§
- range_
set - 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§
- Iter
- Iterates over elements of the
RangeSet - Range
Set - A set of primitive integers represented as a sorted list of disjoint, inclusive ranges.
Constants§
- DEFAULT_
RANGE_ COUNT - The default size of the inner smallvec’s on-stack array.
Functions§
- report_
sizes - Report some sizes of various range set types
- valid_
range_ slice - Tests a slice of ranges for validity as a range set: the element ranges must be properly disjoint (not adjacent) and sorted.