Skip to content

An example C++ wrapper around Boost RTree for Nearest-Neighbor computation

License

Notifications You must be signed in to change notification settings

pradeepr-roboticist/NNRTree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NNRTree

This is a C++ wrapper class around the Boost RTree library.

It supports the following operations:

  1. Point insertion (insert_point): It takes in a point and a point ID. The point ID is an identification number that you want the inserted point to be associated with. e.g., point = (0, 2) and ID = 23
  2. Query k-Nearest Neigbors (query_knn): It takes a query point and the number of neighbors to look for. It returns the IDs of k number of points that are close to the query point.
  3. TODO

Limitations

  1. Since the dimension (DIM) of the RTree is a compile-time constant, users have to manually define the dimension and appropriately modify the member functions in NNRTree.cpp for arbitrary dimensions. A good workaround is setting an upperbound dimension (say 10) and whenever you are working with k < DIM, you can set the rest of the (DIM-k) dimensions to be zero.

Build instructions

  1. git clone https://github.com/pradeepr-roboticist/NNRTree.git
  2. mkdir build
  3. cmake ..
  4. make
  5. ./test_nnrtree

Author

Pradeep Rajendran

License

Copyright © 2019 Pradeep Rajendran Released under the GNU General Public License.

About

An example C++ wrapper around Boost RTree for Nearest-Neighbor computation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published