unbounded_interval_tree/lib.rs
1//! Implementation of an interval tree ([`interval_tree::IntervalTree`]) that works with inclusive/exclusive
2//! bounds, as well as unbounded intervals. It is based on the
3//! data structure described in Cormen et al.
4//! (2009, Section 14.3: Interval trees, pp. 348–354). It provides methods
5//! for "stabbing queries" (as in "is point `p` or an interval `i` contained in any intervals
6//! in the tree of intervals?"), as well as helpers to get the difference between a queried
7//! interval and the database (in order to find subsegments not covered), and the list of
8//! intervals in the database overlapping a queried interval.
9//!
10//! Note that any type satisfying the [`Ord`] trait can be stored in this tree.
11//!
12//! # Features
13//!
14//! * `serde` — Enables using [Serde](http://serde.rs) to serialize/deserialize the interval tree.
15
16/// An interval tree implemented with a binary search tree.
17pub mod interval_tree;
18mod node;