https://github.com/fluttercommunity/interval_tree
A non-overlapping interval tree for Dart
https://github.com/fluttercommunity/interval_tree
dart interval-tree
Last synced: 3 months ago
JSON representation
A non-overlapping interval tree for Dart
- Host: GitHub
- URL: https://github.com/fluttercommunity/interval_tree
- Owner: fluttercommunity
- License: mit
- Created: 2020-04-23T15:39:05.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-11-20T16:17:43.000Z (over 1 year ago)
- Last Synced: 2025-03-28T15:51:58.411Z (4 months ago)
- Topics: dart, interval-tree
- Language: Dart
- Homepage: https://pub.dev/packages/interval_tree
- Size: 30.3 KB
- Stars: 5
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/fluttercommunity/community)
# Interval Tree for Dart
[](https://pub.dev/packages/interval_tree)
[](https://opensource.org/licenses/MIT)
[](https://github.com/fluttercommunity/interval_tree/actions/workflows/build.yml)
[](https://codecov.io/gh/fluttercommunity/interval_tree)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].[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