MRPT
1.9.9
|
An L2-metric KD-tree adaptor for working with data directly stored in an Eigen Matrix, without duplicating the data storage.
Each row in the matrix represents a point in the state space.
Example of usage:
DIM | If set to >0, it specifies a compile-time fixed dimensionality for the points in the data set, allowing more compiler optimizations. |
Distance | The distance metric to use: nanoflann::metric_L1, nanoflann::metric_L2, nanoflann::metric_L2_Simple, etc. |
Definition at line 1307 of file nanoflann.hpp.
#include <nanoflann.hpp>
Public Types | |
typedef KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance > | self_t |
typedef MatrixType::Scalar | num_t |
typedef MatrixType::Index | IndexType |
typedef Distance::template traits< num_t, self_t >::distance_t | metric_t |
typedef KDTreeSingleIndexAdaptor< metric_t, self_t, DIM, IndexType > | index_t |
Public Member Functions | |
KDTreeEigenMatrixAdaptor (const int dimensionality, const MatrixType &mat, const int leaf_max_size=10) | |
The kd-tree index for the user to call its methods as usual with any other FLANN index. More... | |
~KDTreeEigenMatrixAdaptor () | |
void | query (const num_t *query_point, const size_t num_closest, IndexType *out_indices, num_t *out_distances_sq, const int=10) const |
Query for the num_closest closest points to a given point (entered as query_point[0:dim-1]). More... | |
Interface expected by KDTreeSingleIndexAdaptor | |
const self_t & | derived () const |
self_t & | derived () |
size_t | kdtree_get_point_count () const |
num_t | kdtree_distance (const num_t *p1, const IndexType idx_p2, IndexType size) const |
num_t | kdtree_get_pt (const IndexType idx, int dim) const |
template<class BBOX > | |
bool | kdtree_get_bbox (BBOX &) const |
Public Attributes | |
index_t * | index |
const MatrixType & | m_data_matrix |
Private Member Functions | |
KDTreeEigenMatrixAdaptor (const self_t &) | |
Hidden copy constructor, to disallow copying this class (Not implemented) More... | |
typedef KDTreeSingleIndexAdaptor< metric_t,self_t,DIM,IndexType> nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::index_t |
Definition at line 1313 of file nanoflann.hpp.
typedef MatrixType::Index nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::IndexType |
Definition at line 1311 of file nanoflann.hpp.
typedef Distance::template traits<num_t,self_t>::distance_t nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::metric_t |
Definition at line 1312 of file nanoflann.hpp.
typedef MatrixType::Scalar nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::num_t |
Definition at line 1310 of file nanoflann.hpp.
typedef KDTreeEigenMatrixAdaptor<MatrixType,DIM,Distance> nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::self_t |
Definition at line 1309 of file nanoflann.hpp.
|
inline |
The kd-tree index for the user to call its methods as usual with any other FLANN index.
Constructor: takes a const ref to the matrix object with the data points
Definition at line 1318 of file nanoflann.hpp.
|
private |
Hidden copy constructor, to disallow copying this class (Not implemented)
|
inline |
Definition at line 1332 of file nanoflann.hpp.
|
inline |
Definition at line 1353 of file nanoflann.hpp.
|
inline |
Definition at line 1356 of file nanoflann.hpp.
|
inline |
Definition at line 1366 of file nanoflann.hpp.
References nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::size().
|
inline |
Definition at line 1385 of file nanoflann.hpp.
|
inline |
Definition at line 1361 of file nanoflann.hpp.
|
inline |
Definition at line 1377 of file nanoflann.hpp.
|
inline |
Query for the num_closest closest points to a given point (entered as query_point[0:dim-1]).
Note that this is a short-cut method for index->findNeighbors(). The user can also call index->... methods as desired.
Definition at line 1343 of file nanoflann.hpp.
References nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init().
index_t* nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::index |
Definition at line 1315 of file nanoflann.hpp.
const MatrixType& nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::m_data_matrix |
Definition at line 1336 of file nanoflann.hpp.
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020 |