Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper node placement #28

Open
digdan opened this issue May 26, 2022 · 1 comment
Open

Improper node placement #28

digdan opened this issue May 26, 2022 · 1 comment

Comments

@digdan
Copy link

digdan commented May 26, 2022

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.

  1. Create a set of random 2d points
  2. Find the single nearest point within a random 2d point.
  3. Remove the single nearest point.
  4. 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.

Let me know if you want a proof of bug.

@digdan
Copy link
Author

digdan commented May 28, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant