Closed hongyuchen1030 closed 1 year ago
All intervals in intervaltree are half-open intervals, including the lower bound but not the upper bound. Unless you do some hackery with the internal boundary table, there is no way to query on the upper bounds of contained intervals, since the upper bound is not part of the interval's range.
Thank you for your reply and information. I fixed it by re-implementing the tree._search_point
function in my local.
Also thanks for making this open-source package! It helps with our project progress a lot.
Welcome!
If you modify _search_point
without also modifying how the tree is built, traversed and balanced, you may occasionally be missing results.
Thanks so much for your information. I will take a deeper look into it.
So I used the following intervals to build the tree
And then I want to find all intervals that overlaps with
0
It will only return the intervals
[0. 0.1745], [-1.75 0.75]
, and the first interval that has0
as its maximum will not return.Is the
intervaltree.at(pt)
not upper bound inclusive? And if so, how to get an upper-bound inclusive query result? Thanks