jamarino / intervaltree Goto Github PK
View Code? Open in Web Editor NEWA light-weight, performant interval tree in C#
License: MIT License
A light-weight, performant interval tree in C#
License: MIT License
Hey @jamarino, first, kudos for creating this library!
It seems that the project contains no license.
There is a MIT license link in the NuGet page that navigates to https://licenses.nuget.org/MIT, which is generic license text with placeholders.
AFAIK, no one can legally use your library until there is an explicit license that allows otherwise.
Could you please add a LICENSE file to the project?
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:
var tree = new QuickIntervalTree<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
System.Exception : Excessive recursion detected, aborting to prevent stack overflow. Please check thread safety.
at Jamarino.IntervalTree.QuickIntervalTree`2.<Build>g__BuildRec|18_0(Int32 min, Int32 max, Int32 nodeIndex, Int32 recursionLevel)
at Jamarino.IntervalTree.QuickIntervalTree`2.<Build>g__BuildRec|18_0(Int32 min, Int32 max, Int32 nodeIndex, Int32 recursionLevel)
at Jamarino.IntervalTree.QuickIntervalTree`2.<Build>g__BuildRec|18_0(Int32 min, Int32 max, Int32 nodeIndex, Int32 recursionLevel)
.......
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.