A mutable, self-balancing interval tree ported from the Python intervaltree
package.
-
Getting started
import IntervalTree, { Interval } from 'intervaltree' const tree = new IntervalTree()
-
Adding intervals
t.addInterval(1, 2, 'data for 1 through 2') t.add(new Interval(3, 4, 'data for 3 through 4'))
See the issue tracker on GitHub.
- Python intervaltree package
- Eternally Confuzzled's AVL tree
- Wikipedia's Interval Tree
- Jordan Baker, 2016-now
The source code for this project is at https://github.com/hexsprite/intervaltree