Skip to content

Add Closest Operation #25

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

Merged
merged 19 commits into from
Feb 23, 2019
Merged

Add Closest Operation #25

merged 19 commits into from
Feb 23, 2019

Conversation

crhallberg
Copy link
Collaborator

@crhallberg crhallberg commented Apr 23, 2018

Finds a specified number of points closest to a given point.

Uses a sort of binary search with the radius of a Circle query. Using Rectangle may be more performant for finding a single closest point but produces inaccurate results for operations expecting multiple detected points.

  • Handle ties in the cases of:
    • Equidistant points
    • Identical points
  • Write tests

For the handling of ties, I specified a limit on the number of checks and return a slice of the current query if we reach it.

@crhallberg crhallberg mentioned this pull request Oct 2, 2018
8 tasks
@shiffman shiffman merged commit feb4a57 into CodingTrain:master Feb 23, 2019
@shiffman
Copy link
Member

Merging!

@crhallberg
Copy link
Collaborator Author

I was working on more optimizations of this because I started working with a huge dataset. It might make sense to wait for the save-load PR so I can contribute that data tree as well.

@shiffman
Copy link
Member

(invite sent btw!)

@crhallberg crhallberg deleted the closest branch October 26, 2021 00:13
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