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

Unwinding of stack, inclusion of a rectangular bounds search, optimization for large numbers of equal points. #14

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ekovac
Copy link

@ekovac ekovac commented Aug 5, 2015

These (incomplete) patches introduce a couple of improvements to jtsiomb/kdtree that wound up being necessary for use in IVPR/Weave.

  • Unwound recursion in insert_rec and clear_rec
  • Added new recursionless function kd_in_bounds for doing a rectangular search.
  • Added an optimization for cases where a point is exactly equal to another point.

Unwinding the recursion is necessary when the number of points is very large. I suggest using the user stack functions I added to also modify the original range query functions, as well as any necessary handling of the equal-point linked list.

@jtsiomb
Copy link
Owner

jtsiomb commented Aug 9, 2015

Thank you for the contribution! I'll examine the changes as soon as I find some time, and probably merge them with my branch soon.

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

Successfully merging this pull request may close these issues.

2 participants