Using a large dataset ( > 500 ) and removing nodes at random will cause the KDTree to not be segmented correctly. This will cause nodes to not be found correctly.
Create a set of random 2d points
Find the single nearest point within a random 2d point.
Remove the single nearest point.
Repeat from step 2 until you have no more points.
Expected outcome. We are able to remove all records from the tree.
Actual: There are records left, as the tree has made some nodes "unreachable" by not placing them correctly due to the remove function.
To follow up. I have discovered this issue happens when trying to remove a node with the same value in any of the dimensions as another node in the tree.
Using a large dataset ( > 500 ) and removing nodes at random will cause the KDTree to not be segmented correctly. This will cause nodes to not be found correctly.
Expected outcome. We are able to remove all records from the tree.
Actual: There are records left, as the tree has made some nodes "unreachable" by not placing them correctly due to the
remove
function.Let me know if you want a proof of bug.