Public Types | Public Member Functions | Public Attributes | Private Member Functions
nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType > Struct Template Reference

#include <nanoflann.hpp>

List of all members.

Public Types

typedef
KDTreeSingleIndexAdaptor
< metric_t, self_t, DIM,
IndexType > 
index_t
typedef Distance::template
traits< num_t, self_t >
::distance_t 
metric_t
typedef MatrixType::Scalar num_t
typedef
KDTreeEigenMatrixAdaptor
< MatrixType, DIM, Distance,
IndexType > 
self_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.
void query (const num_t *query_point, const size_t num_closest, IndexType *out_indices, num_t *out_distances_sq, const int nChecks_IGNORED=10) const
 ~KDTreeEigenMatrixAdaptor ()
Interface expected by KDTreeSingleIndexAdaptor
const self_tderived () const
self_tderived ()
size_t kdtree_get_point_count () const
num_t kdtree_distance (const num_t *p1, const size_t idx_p2, size_t size) const
num_t kdtree_get_pt (const size_t idx, int dim) const
template<class BBOX >
bool kdtree_get_bbox (BBOX &bb) const

Public Attributes

index_tindex
const MatrixType & m_data_matrix

Private Member Functions

 KDTreeEigenMatrixAdaptor (const self_t &)

Detailed Description

template<class MatrixType, int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
struct nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >

A simple 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:

        Eigen::Matrix<num_t,Dynamic,Dynamic>  mat;
        // Fill out "mat"...

        typedef KDTreeEigenMatrixAdaptor< Eigen::Matrix<num_t,Dynamic,Dynamic> >  my_kd_tree_t;
        const int max_leaf = 10;
        my_kd_tree_t   mat_index(dimdim, mat, max_leaf );
        mat_index.index->buildIndex();
        mat_index.index->...
Template Parameters:
DIMIf set to >0, it specifies a compile-time fixed dimensionality for the points in the data set, allowing more compiler optimizations.
DistanceThe distance metric to use: nanoflann::metric_L1, nanoflann::metric_L2, nanoflann::metric_L2_Simple, etc.
IndexTypeThe type for indices in the KD-tree index (typically, size_t of int)

Definition at line 1369 of file nanoflann.hpp.


Member Typedef Documentation

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
typedef KDTreeSingleIndexAdaptor< metric_t,self_t,DIM,IndexType> nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::index_t

Definition at line 1374 of file nanoflann.hpp.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
typedef Distance::template traits<num_t,self_t>::distance_t nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::metric_t

Definition at line 1373 of file nanoflann.hpp.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
typedef MatrixType::Scalar nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::num_t

Definition at line 1372 of file nanoflann.hpp.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
typedef KDTreeEigenMatrixAdaptor<MatrixType,DIM,Distance,IndexType> nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::self_t

Definition at line 1371 of file nanoflann.hpp.


Constructor & Destructor Documentation

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::KDTreeEigenMatrixAdaptor ( const int  dimensionality,
const MatrixType &  mat,
const int  leaf_max_size = 10 
) [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 1379 of file nanoflann.hpp.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::KDTreeEigenMatrixAdaptor ( const self_t ) [private]

Hidden copy constructor, to disallow copying this class (Not implemented)

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::~KDTreeEigenMatrixAdaptor ( ) [inline]

Definition at line 1392 of file nanoflann.hpp.


Member Function Documentation

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
const self_t& nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::derived ( ) const [inline]

Definition at line 1413 of file nanoflann.hpp.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
self_t& nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::derived ( ) [inline]

Definition at line 1416 of file nanoflann.hpp.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
num_t nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::kdtree_distance ( const num_t p1,
const size_t  idx_p2,
size_t  size 
) const [inline]

Definition at line 1426 of file nanoflann.hpp.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
template<class BBOX >
bool nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::kdtree_get_bbox ( BBOX &  bb) const [inline]

Definition at line 1445 of file nanoflann.hpp.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
size_t nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::kdtree_get_point_count ( ) const [inline]

Definition at line 1421 of file nanoflann.hpp.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
num_t nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::kdtree_get_pt ( const size_t  idx,
int  dim 
) const [inline]

Definition at line 1437 of file nanoflann.hpp.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
void nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::query ( const num_t query_point,
const size_t  num_closest,
IndexType *  out_indices,
num_t out_distances_sq,
const int  nChecks_IGNORED = 10 
) const [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.

Note:
nChecks_IGNORED is ignored but kept for compatibility with the original FLANN interface.

Definition at line 1403 of file nanoflann.hpp.


Member Data Documentation

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
index_t* nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::index

Definition at line 1376 of file nanoflann.hpp.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2, typename IndexType = size_t>
const MatrixType& nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance, IndexType >::m_data_matrix

Definition at line 1396 of file nanoflann.hpp.


The documentation for this struct was generated from the following file:


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:41:08