Repository navigation
Support open bounds in static interval tree queries - #263
Closed
Aschenbath wants to merge 1 commit into
Closed
Aschenbath wants to merge 1 commit into
Aschenbath wants to merge 1 commit into
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add optional
openBegin/openEndquery flags, retaining closed bounds by default. For overlap queries the selected convention applies to both indexed and query intervals. Empty open intervals do not match; getters continue to work. Add TypeScript options and a README example.Fixes #227.
The tree still indexes closed endpoint bounds as a conservative search envelope, so changing query conventions does not require rebuilding the index. Traversal and result ordering are unchanged; only membership checks differ.
Validation: four new tests fail before implementation; the full suite passes with 569 tests and one existing pending test. Boundary/interior sample-set checks cover all four endpoint conventions and degenerate intervals. Full ESLint and a strict TypeScript smoke check pass.
A local Node 24 microbenchmark of 100,000 default point/overlap queries over 32,768 intervals measured medians of 37.07ms before and 39.70ms after (about 7% slower, seven measured alternating trials after warmup). This is one synthetic workload, not a general performance guarantee.
Prepared with OpenAI Codex assistance.