-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-write based on AvlTreeSet from quiver.collection
- Loading branch information
Showing
8 changed files
with
793 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,46 @@ | ||
[](https://pub.dev/packages/interval_tree) | ||
[](https://opensource.org/licenses/MIT) | ||
 | ||
|
||
# interval_tree | ||
|
||
This is a Dart port of [a minimal C++ interval tree implementation](https://github.com/ekg/intervaltree). | ||
A [Dart][1] implementation of an [interval tree][2], with support for | ||
calculating unions, intersections, and differences between individual | ||
intervals, or entire iterable collections of intervals, such as other | ||
interval trees. | ||
|
||
## Mutable | ||
|
||
IntervalTree has support for adding and removing intervals, or entire | ||
iterable collections of intervals, such as other interval trees. | ||
|
||
## Non-overlapping | ||
|
||
IntervalTree automatically joins and splits appropriate intervals at | ||
insertions and removals, respectively, whilst maintaining a collection | ||
of non-overlapping intervals. | ||
|
||
## Iterable | ||
|
||
IntervalTree is an [iterable collection][3] offering all standard | ||
iterable operations, such as easily accessing the first and last | ||
interval. | ||
|
||
## History | ||
|
||
IntervalTree started off as a quick and dirty Dart port of Erik | ||
Garrison's [simple C++ interval tree implementation][4], but was soon | ||
re-written and based on [quiver.collection's][6] AVL implementation of | ||
a self-balancing binary tree [AvlTreeSet][7]. | ||
|
||
## License | ||
|
||
IntervalTree is licensed under the [MIT][5] license. | ||
|
||
[1]: https://dart.dev | ||
[2]: https://en.wikipedia.org/wiki/Interval_tree | ||
[3]: https://dart.dev/codelabs/iterables | ||
[4]: https://github.com/ekg/intervaltree | ||
[5]: https://opensource.org/licenses/MIT | ||
[6]: https://pub.dev/packages/quiver | ||
[7]: https://pub.dev/documentation/quiver/latest/quiver.collection/AvlTreeSet-class.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.