|
Boost Users : |
Subject: Re: [Boost-users] nearest neighbors search with boost
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2014-04-11 06:35:27
Hi Georgios,
Georgios Samaras wrote:
> I just find out that boost supports nearest neighbor searching, will
> amazes me. However, I do not want just to use the nearest() method, I
> want to study it and understand it. Is there any relevant
> documentation, specifically on how NNS is performed in R-tree? Are the
> code files that implement this method visible to the user? I
> downloaded the latest .tar file.
Of course, Boost is oprn-source. Boost We're now at GitHub.
Here is the main module: http://github.com/boostorg
Boost.Geometry: http://github.com/boostorg/geometry
Boost.Geometry develop branch:
http://github.com/boostorg/geometry/tree/develop
As for the kNN query, see the reference #2 in the docs:
http://www.boost.org/doc/libs/1_55_0/libs/geometry/doc/html/geometry/spatial_indexes/introduction.html
There is no documentation of the internals. In all cases we use the
visitor design pattern to traverse the rtree (the interface similar to
the Boost.Variant's static_visitor<>). If the nearest() predicate is
passed to the query() function, the distance_query<> visitor is used. It
can be found here:
http://github.com/boostorg/geometry/blob/develop/include/boost/geometry/index/detail/rtree/visitors/distance_query.hpp
Regards,
Adam
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net