Interval Tree for Dart
A Dart implementation of an interval tree, with support for calculating unions, intersections, and differences between individual intervals, or entire iterable collections of intervals, such as other interval trees.
IntervalTree has support for adding and removing intervals, or entire iterable collections of intervals, such as other interval trees.
IntervalTree automatically joins and splits appropriate intervals at insertions and removals, respectively, whilst maintaining a collection of non-overlapping intervals.
IntervalTree is an iterable collection offering all standard iterable operations, such as easily accessing the first and last interval.
IntervalTree started off as a quick and dirty Dart port of Erik Garrison's simple C++ interval tree implementation, but was soon re-written and based on quiver.collection's AVL implementation of a self-balancing binary tree AvlTreeSet.
- The library provides a non-overlapping interval tree implementation with support for calculating unions, intersections, and differences between individual intervals and entire trees.