Skip to main content

Module rmap

Module rmap 

Source
Expand description

A collection that manages disjoint, inclusive ranges [start, end].

§Design

  • Ranges are stored in ascending order of their start points.
  • Ranges are disjoint; there are no overlapping ranges.
  • Adjacent ranges are merged (e.g., inserting 5 into [0,4] and then inserting 4 results in [0,5]).
  • Each key in the BTreeMap represents the inclusive start of a range, and its corresponding value represents the inclusive end of that range.

Structs§

RMap
A collection that manages disjoint, inclusive ranges [start, end].