Expand description
This crates implements map and set with interval keys (ranges x..y
).
IntervalMap is implemented using red-black binary tree, where each node contains information about the smallest start and largest end in its subtree. The tree takes O(N) space and allows insertion, removal and search in O(log N). IntervalMap allows to search for all entries overlapping a query (interval or a point, output would be sorted by keys) in O(log N + K) where K is the size of the output.
IntervalSet is a newtype over IntervalMap with empty values.
§Features
By default, iset
is no_std
.
Three optional features are:
std
: no additional effects,serde
: Serialization/Deserialization (requiresstd
environment),dot
: allows to write interval maps and sets to .dot files (requiresstd
).
Re-exports§
pub use ix::DefaultIx;
pub use set::IntervalSet;
pub use entry::Entry;
Modules§
- entry
- iter
- Module with various iterators over
IntervalMap
andIntervalSet
. - ix
- Wrapper around integer types, used as indices within
IntervalMap
andIntervalSet
. - set
IntervalSet
implementation.
Macros§
- interval_
map - Macros for IntervalMap creation.
- interval_
set - Macros for IntervalSet creation.
Structs§
- Interval
Map - Map with interval keys (
x..y
).