#include <KDTreeVectorOfVectorsAdaptor.h>
A simple vector-of-vectors adaptor for nanoflann, without duplicating the storage. The i'th vector represents a point in the state space.
| DIM | If set to >0, it specifies a compile-time fixed dimensionality for the points in the data set, allowing more compiler optimizations. |
| num_t | The type of the point coordinates (typ. double or float). |
| Distance | The distance metric to use: nanoflann::metric_L1, nanoflann::metric_L2, nanoflann::metric_L2_Simple, etc. |
| IndexType | The type for indices in the KD-tree index (typically, size_t of int) |
Definition at line 57 of file KDTreeVectorOfVectorsAdaptor.h.
Public Types | |
| using | index_t = nanoflann::KDTreeSingleIndexAdaptor<metric_t, self_t, DIM, IndexType> |
| using | metric_t = typename Distance::template traits<num_t, self_t>::distance_t |
| using | self_t = KDTreeVectorOfVectorsAdaptor<VectorOfVectorsType, num_t, DIM, Distance> |
Public Member Functions | |
| KDTreeVectorOfVectorsAdaptor (const KDTreeVectorOfVectorsAdaptor &)=delete | |
| KDTreeVectorOfVectorsAdaptor (const vcl_size_t, const VectorOfVectorsType &mat, const int leaf_max_size=10) | |
| KDTreeVectorOfVectorsAdaptor (KDTreeVectorOfVectorsAdaptor &&)=delete | |
| KDTreeVectorOfVectorsAdaptor & | operator= (const KDTreeVectorOfVectorsAdaptor &)=delete |
| KDTreeVectorOfVectorsAdaptor & | operator= (KDTreeVectorOfVectorsAdaptor &&)=delete |
| void | query (const num_t *query_point, const vcl_size_t num_closest, IndexType *out_indices, num_t *out_distances_sq, const int nChecks_IGNORED=10) const |
| ~KDTreeVectorOfVectorsAdaptor () | |
Interface expected by KDTreeSingleIndexAdaptor | |
| const self_t & | derived () const |
| self_t & | derived () |
| vcl_size_t | kdtree_get_point_count () const |
| num_t | kdtree_get_pt (const vcl_size_t idx, const vcl_size_t dim) const |
| template<class BBOX> | |
| bool | kdtree_get_bbox (BBOX &) const |
Public Attributes | |
| index_t * | index = nullptr |
| const VectorOfVectorsType & | m_data |
| using KDTreeVectorOfVectorsAdaptor< VectorOfVectorsType, num_t, DIM, Distance, IndexType >::index_t = nanoflann::KDTreeSingleIndexAdaptor<metric_t, self_t, DIM, IndexType> |
Definition at line 61 of file KDTreeVectorOfVectorsAdaptor.h.
| using KDTreeVectorOfVectorsAdaptor< VectorOfVectorsType, num_t, DIM, Distance, IndexType >::metric_t = typename Distance::template traits<num_t, self_t>::distance_t |
Definition at line 60 of file KDTreeVectorOfVectorsAdaptor.h.
| using KDTreeVectorOfVectorsAdaptor< VectorOfVectorsType, num_t, DIM, Distance, IndexType >::self_t = KDTreeVectorOfVectorsAdaptor<VectorOfVectorsType, num_t, DIM, Distance> |
Definition at line 59 of file KDTreeVectorOfVectorsAdaptor.h.
|
inline |
Constructor: takes a const ref to the vector of vectors object with the data points
Definition at line 69 of file KDTreeVectorOfVectorsAdaptor.h.
|
inline |
Definition at line 83 of file KDTreeVectorOfVectorsAdaptor.h.
|
delete |
|
delete |
|
inline |
Definition at line 124 of file KDTreeVectorOfVectorsAdaptor.h.
|
inline |
Definition at line 119 of file KDTreeVectorOfVectorsAdaptor.h.
|
inline |
Definition at line 150 of file KDTreeVectorOfVectorsAdaptor.h.
|
inline |
Definition at line 131 of file KDTreeVectorOfVectorsAdaptor.h.
|
inline |
Definition at line 138 of file KDTreeVectorOfVectorsAdaptor.h.
|
delete |
|
delete |
|
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 104 of file KDTreeVectorOfVectorsAdaptor.h.
| index_t* KDTreeVectorOfVectorsAdaptor< VectorOfVectorsType, num_t, DIM, Distance, IndexType >::index = nullptr |
The kd-tree index for the user to call its methods as usual with any other FLANN index
Definition at line 65 of file KDTreeVectorOfVectorsAdaptor.h.
| const VectorOfVectorsType& KDTreeVectorOfVectorsAdaptor< VectorOfVectorsType, num_t, DIM, Distance, IndexType >::m_data |
Definition at line 93 of file KDTreeVectorOfVectorsAdaptor.h.