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

KDTree functions for KDTreeType #3

Closed
paradoxysm opened this issue Feb 12, 2020 · 2 comments
Closed

KDTree functions for KDTreeType #3

paradoxysm opened this issue Feb 12, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@paradoxysm
Copy link
Owner

paradoxysm commented Feb 12, 2020

Describe the bug

Since KDTree.insert only checks the value's 'axis', any override types don't exactly follow.

To Reproduce

Steps to reproduce the behavior:

  1. Create a class that extends KDTreeType and has two values, one which __getitem__ looks at.
  2. Insert two instances of this class where said value is equal but the objects are not equivalent.
  3. The tree will only insert the first object.

Expected behavior

KDTree.insert should first check for equality and do nothing if equality is satisfied. One of comparisons on the axis should include when the 'axis' value is equal (I suggest the right subtree).

Desktop (please complete the following information):

  • Python: Version independent
  • OS: OS independent
  • Version: 0.1.5
@paradoxysm paradoxysm added the bug Something isn't working label Feb 12, 2020
@paradoxysm
Copy link
Owner Author

This extends similarly to search and delete

@paradoxysm paradoxysm changed the title KDTree.insert for KDTreeType KDTree functions for KDTreeType Feb 12, 2020
@paradoxysm
Copy link
Owner Author

Resolved for all three methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant