template<class T>
class FlatIntervalTree< T >
A specialized implementation of an Interval Tree optimized for Bash++'s particular use case.
Copyright (C) 2025 Andrew S. Rightenburg Bash++: Bash with classes
This implementation is designed to efficiently store and query intervals representing code entities in Bash++ source files. It supports insertion of intervals and querying for the innermost overlapping interval at a given point.
It's possible to design this as a "flat" structure because of our invariants:
- Intervals are only inserted and never removed.
- Queries are only made after all insertions are complete.
- Intervals do not partially overlap; they are either entirely nested or entirely disjoint.
These invariants allow us to use a sorted vector and binary search for efficient querying, avoiding the complexity of a traditional tree structure.
- Template Parameters
-
| T | The type of the payload associated with each interval. |