You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @jamarino!
Thanks again for this library, so far it does exactly what I need.
There was a minor issue I came across.
I happened to incorrectly add a reversed interval to QuickIntervalTree (from greater than to).
No validation errors occurred.
However, when attempted to run Query, I got a System.Exception saying "Excessive recursion detected".
If reverse intervals cause such behavior, wouldn't it be better to validate from and to in the Add method?
Could save the users some time looking for their bugs.
Here is the reproduction:
vartree=newQuickIntervalTree<int,string>();
tree.Add(100,200,"abc");
tree.Add(10,20,"def");
tree.Add(-100,-200,"uvw");// incorrect; should be (-200, -100)
tree.Add(50,150,"xyz");
tree.Query(-150,150).ToArray();// System.Exception here
Hello again, @felix-b !
What a silly oversight on my part! I'm glad the recursion check paid off... 😅
Your suggested changes look good to me and align well with the behaviour of RangeTree (for compatibility). I'll get 'em merged and published. Thank you!
Hi @jamarino!
Thanks again for this library, so far it does exactly what I need.
There was a minor issue I came across.
I happened to incorrectly add a reversed interval to QuickIntervalTree (from greater than to).
No validation errors occurred.
However, when attempted to run Query, I got a System.Exception saying "Excessive recursion detected".
If reverse intervals cause such behavior, wouldn't it be better to validate from and to in the Add method?
Could save the users some time looking for their bugs.
Here is the reproduction:
The text was updated successfully, but these errors were encountered: