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

Add nearest neighbour function #20

Open
patricoferris opened this issue Sep 18, 2023 · 5 comments
Open

Add nearest neighbour function #20

patricoferris opened this issue Sep 18, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@patricoferris
Copy link
Contributor

It seems very common for Rtree implementations to provide a nearest_neighbour function, so we should do the same! A few examples from other Rtree (or related) libraries.

  1. Rust RStar library: https://github.com/georust/rstar/blob/master/rstar/src/algorithm/nearest_neighbor.rs
  2. Another one in Go: https://github.com/dhconnelly/rtreego/blob/master/rtree.go

The Go one makes reference to http://www.cs.ucr.edu/~ravi/CS236Papers/roussopoulosNN95.pdf

This is quite involved so do have a look for other good first issues if you haven't made a contribution yet unless you feel comfortable. And do ask questions!

@patricoferris patricoferris added the enhancement New feature or request label Sep 18, 2023
@harshey1103
Copy link
Contributor

harshey1103 commented Oct 6, 2023

Hi @patricoferris, I would love to work on this issue. Is there any documentation pertaining to the nearest neighbor function of what it should do or should I just check the code in Go/Rust and try to mimic it in Ocaml?

@AryanGodara
Copy link

Hi @patricoferris, I would love to work on this issue. Is there any documentation pertaining to the nearest neighbor function of what it should do or should I just check the code in Go/Rust and try to mimic it in Ocaml?

It can be a good approach to go through the Rust implementation :)
Did you find any good resources over these last days?

@harshey1103
Copy link
Contributor

Hi @patricoferris, I would love to work on this issue. Is there any documentation pertaining to the nearest neighbor function of what it should do or should I just check the code in Go/Rust and try to mimic it in Ocaml?

It can be a good approach to go through the Rust implementation :) Did you find any good resources over these last days?

Nope :( I didn't find any, I have been preoccupied with some other work recently, and I had expected the project mentors to provide me with the resources. I'll look up the resources and see what I can find.

@kushalpokharel
Copy link
Contributor

Hi @patricoferris, do we want to calculate the nearest neighbor from a point specifically to our values (leaf nodes)? My question is where do I keep the distance functions? Should it be inside of module V or should I create a module called Point?

@patricoferris
Copy link
Contributor Author

Good question @kushalpokharel , for now let's start with a dedicated Point module and go from there

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

No branches or pull requests

4 participants