EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance > Struct Template Reference

#include <fun4all_coresoftware/blob/master/offline/packages/PHTpcTracker/externals/nanoflann.hpp>

+ Collaboration diagram for nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >:

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
 
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.
 
 ~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
 
 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.
 
 ~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
 
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 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
 
const self_tderived () const
 
self_tderived ()
 
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_tindex
 
const MatrixType & m_data_matrix
 

Private Member Functions

 KDTreeEigenMatrixAdaptor (const self_t &)
 
 KDTreeEigenMatrixAdaptor (const self_t &)
 

Detailed Description

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

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:

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.

Definition at line 1415 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1415 of file nanoflann.hpp

Member Typedef Documentation

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

Definition at line 1421 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1421 of file nanoflann.hpp

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

Definition at line 1421 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1421 of file nanoflann.hpp

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

Definition at line 1419 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1419 of file nanoflann.hpp

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

Definition at line 1419 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1419 of file nanoflann.hpp

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

Definition at line 1420 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1420 of file nanoflann.hpp

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

Definition at line 1420 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1420 of file nanoflann.hpp

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

Definition at line 1418 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1418 of file nanoflann.hpp

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

Definition at line 1418 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1418 of file nanoflann.hpp

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

Definition at line 1417 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1417 of file nanoflann.hpp

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

Definition at line 1417 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1417 of file nanoflann.hpp

Constructor & Destructor Documentation

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2>
nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::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 1426 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1426 of file nanoflann.hpp

References DIM.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2>
nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::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>
nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::~KDTreeEigenMatrixAdaptor ( )
inline

Definition at line 1442 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1442 of file nanoflann.hpp

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2>
nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::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 1426 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1426 of file nanoflann.hpp

References DIM.

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2>
nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::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>
nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::~KDTreeEigenMatrixAdaptor ( )
inline

Definition at line 1442 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1442 of file nanoflann.hpp

Member Function Documentation

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

Definition at line 1464 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1464 of file nanoflann.hpp

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

Definition at line 1464 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1464 of file nanoflann.hpp

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

Definition at line 1468 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1468 of file nanoflann.hpp

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

Definition at line 1468 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1468 of file nanoflann.hpp

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

Definition at line 1480 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1480 of file nanoflann.hpp

References d, Acts::UnitConstants::s, and nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::size().

+ Here is the call graph for this function:

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

Definition at line 1480 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1480 of file nanoflann.hpp

References d, Acts::UnitConstants::s, and nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::size().

+ Here is the call graph for this function:

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

Definition at line 1501 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1501 of file nanoflann.hpp

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

Definition at line 1501 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1501 of file nanoflann.hpp

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

Definition at line 1474 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1474 of file nanoflann.hpp

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

Definition at line 1474 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1474 of file nanoflann.hpp

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

Definition at line 1492 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1492 of file nanoflann.hpp

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

Definition at line 1492 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1492 of file nanoflann.hpp

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2>
void nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::query ( const num_t query_point,
const size_t  num_closest,
IndexType out_indices,
num_t out_distances_sq,
const int  = 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 1454 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1454 of file nanoflann.hpp

References nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init().

+ Here is the call graph for this function:

template<class MatrixType , int DIM = -1, class Distance = nanoflann::metric_L2>
void nanoflann::KDTreeEigenMatrixAdaptor< MatrixType, DIM, Distance >::query ( const num_t query_point,
const size_t  num_closest,
IndexType out_indices,
num_t out_distances_sq,
const int  = 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 1454 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1454 of file nanoflann.hpp

References nanoflann::KNNResultSet< DistanceType, IndexType, CountType >::init().

+ Here is the call graph for this function:

Member Data Documentation

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

Definition at line 1423 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1423 of file nanoflann.hpp

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

Definition at line 1447 of file nanoflann.hpp.

View newest version in sPHENIX GitHub at line 1447 of file nanoflann.hpp


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