I was looking for a kdtree that supported adding points incrementally and your implementation were the first I found that did that. I tried it out and found it worked very well, but ran into the issue that it would throw a stack overflow error when I added a large number of points. I solved this by modifying the functions I were using to descend iteratively rather than recursively. I haven't done any benchmarks, but I'm guessing that this also improves performance somewhat. It does however still pass all tests.
I'm not sure if it was a conscious choice on your part to use recursion, and if so, feel free to reject this pull request.
In any case, thanks for an excellent little library that saved me some time.
Hi,
I was looking for a kdtree that supported adding points incrementally and your implementation were the first I found that did that. I tried it out and found it worked very well, but ran into the issue that it would throw a stack overflow error when I added a large number of points. I solved this by modifying the functions I were using to descend iteratively rather than recursively. I haven't done any benchmarks, but I'm guessing that this also improves performance somewhat. It does however still pass all tests.
I'm not sure if it was a conscious choice on your part to use recursion, and if so, feel free to reject this pull request.
In any case, thanks for an excellent little library that saved me some time.