Nice, does it work with nimsuggest and Nim editors?
My RTree unfortunately blocks nimsuggest for 30 seconds permanently, which makes using it a bit hard. Maybe next winter I will compare your tree against my one.
I'm not sure if it works with nimsuggest. I'm still just experimenting with Nim and am not all that knowledgable of it's larger ecosystem. Is there a way that I can check if it works with nimsuggest?
I've seen your RTree implementation and it's quite impressive!
When its works in editors like VScode or neovim fine then all is ok, and I think it will as it is not that much generic.
My RTree is very generic, and nimsuggest has big problems with it. I was told that neovim is not really blocked, as it uses async LSP, but of course all is delayed much.
You may know that while RTree is designed for rectangles, it should work with point data fine. But your k-d-tree may work better for point data.
There are small typos in proc names (revert i and e): nearestNieghbour should be written nearestNeighbour, and similar for nearestNieghbours. Or if you prefer the American wording, nearestNeighbor... Better to correct that now than when it is broadly used.
Have been referenced in Nim curated packages,
This looks very promising but K cannot be set at runtime, which limits the use quite a bit. I didn't look at the code too closely, but maybe you could do:
type KdPoint*[T:SomeNumber] = UncheckedArray[T]
but that's using a static int, so the K still can not be set at runtime. did I miss something?