davidmoten / rtree

Immutable in-memory R-tree and R*-tree implementations in Java with reactive api
Apache License 2.0
1.09k stars 211 forks source link

How to do an incremental knn search? #163

Open zyz760543032 opened 1 year ago

zyz760543032 commented 1 year ago

Incremental knn search save the priority queue in each round generated by knn search if best-first strategy is adopted, and use priority queue saved in the previous round to search knn in the current round. I want to do an incremental knn search. Does anyone can teach me, thank you very much!

zyz760543032 commented 1 year ago

This is the paper proposing incremental knn algorithm: http://urban-computing.com/pdf/Searching20Similar20Trajectories20by20Locations.pdf

davidmoten commented 1 year ago

So you want to adapt this library to enable a knn search? Why? Is this a course assignment? Do you have a real use case? I'm happy to consider a PR if it makes little change to existing code.

zyz760543032 commented 1 year ago

Thanks for your reply. I want to realize the algorithm proposed in a paper where the knn search is adopted. In addition, I found your "nearest" method is not a true knn search, so could you realize a true knn search or at best an incremental knn search? thank you :) More detail about the algorithm is presented in this paper: http://urban-computing.com/pdf/Searching20Similar20Trajectories20by20Locations.pdf

davidmoten commented 1 year ago

Ok, implementing knn algorithm as described is not a priority for me at the moment but could be done. I'm happy to consider a PR from you or another member of the community, otherwise I may have a look at it medium term.

zyz760543032 commented 1 year ago

Thanks for your help!