v0.8.1
The biggest change introduced by this release moves the responsibility of filtering points from the KdTree to the search visitor. Previously, the KdTree would use a visitor's max()
method to filter both the nodes of the tree as well as the points residing in the non-filtered nodes. Moving this responsibility makes it possible for the visitor to inspect all the points of the non-filtered nodes instead of just a sub-set, giving the visitor more control and information during a query. This allows, for example, the implementation of the following features:
- An approximate radius search. This was impossible with an older version (equal to setting a smaller search radius).
- Knowing the exact amount of points encountered during a query (see
kd_tree_custom_search_visitor.cpp
).
Filtering in the visitor also improved the existing approximate k nearest neighbor query. Of all the points that are visited during a query, it will now be guaranteed to return k the nearest.
WARNING! To those who implemented a custom search visitor: Make sure to add extra filtering to avoid having the best nearest neighbor candidate being overwritten by a worse candidate!
Other changes:
- The
LInf
metric has been added for both C++ and Python. - Updated the
search_box
interface for Python to obtain a small performance improvement. - Removed an unsupported
SpaceMap
constructor. - Interfacing with an
Eigen::Map
ofconst Eigen::Matrix
added. There was only support for non-const matrices. - Added the approximate version of
SearchNn
(C++),SearchRadius
(C++), andsearch_radius
(Python). - Updated various examples and added KdTree serialization and MNIST examples.