MUQ  0.4.3
muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType > Struct Template Reference

#include <FlannCache.h>

Detailed Description

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
struct muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >

Definition at line 20 of file FlannCache.h.

Public Types

typedef DynamicKDTreeAdaptor< Distance, IndexType > self_t
 
typedef Distance::template traits< double, self_t >::distance_t metric_t
 
typedef nanoflann::KDTreeSingleIndexDynamicAdaptor< metric_t, self_t,-1, IndexType > index_t
 

Public Member Functions

 DynamicKDTreeAdaptor (const int dim, const int leaf_max_size=10)
 Constructor: takes a const ref to the vector of vectors object with the data points. More...
 
void UpdateIndex (const int leaf_max_size=10)
 
virtual ~DynamicKDTreeAdaptor ()
 
void add (Eigen::VectorXd const &newPt)
 
std::pair< std::vector< IndexType >, std::vector< double > > query (Eigen::VectorXd const &query_point, const size_t num_closest, const int nChecks_IGNORED=10) const
 
const self_tderived () const
 
self_tderived ()
 
size_t kdtree_get_point_count () const
 
double kdtree_get_pt (const size_t idx, int dim) const
 
template<class BBOX >
bool kdtree_get_bbox (BBOX &) const
 

Public Attributes

std::shared_ptr< index_tindex
 
std::deque< Eigen::VectorXd > m_data
 The kd-tree index for the user to call its methods as usual with any other FLANN index. More...
 

Friends

class FlannCache
 

Member Typedef Documentation

◆ index_t

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
typedef nanoflann::KDTreeSingleIndexDynamicAdaptor< metric_t,self_t,-1,IndexType> muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::index_t

Definition at line 26 of file FlannCache.h.

◆ metric_t

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
typedef Distance::template traits<double,self_t>::distance_t muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::metric_t

Definition at line 25 of file FlannCache.h.

◆ self_t

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
typedef DynamicKDTreeAdaptor<Distance,IndexType> muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::self_t

Definition at line 24 of file FlannCache.h.

Constructor & Destructor Documentation

◆ DynamicKDTreeAdaptor()

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::DynamicKDTreeAdaptor ( const int  dim,
const int  leaf_max_size = 10 
)
inline

Constructor: takes a const ref to the vector of vectors object with the data points.

Definition at line 32 of file FlannCache.h.

References muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::index.

◆ ~DynamicKDTreeAdaptor()

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
virtual muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::~DynamicKDTreeAdaptor ( )
inlinevirtual

Definition at line 42 of file FlannCache.h.

Member Function Documentation

◆ add()

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
void muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::add ( Eigen::VectorXd const &  newPt)
inline

◆ derived() [1/2]

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
self_t& muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::derived ( )
inline

Definition at line 72 of file FlannCache.h.

◆ derived() [2/2]

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
const self_t& muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::derived ( ) const
inline

Definition at line 68 of file FlannCache.h.

◆ kdtree_get_bbox()

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
template<class BBOX >
bool muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::kdtree_get_bbox ( BBOX &  ) const
inline

Definition at line 93 of file FlannCache.h.

◆ kdtree_get_point_count()

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
size_t muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::kdtree_get_point_count ( ) const
inline

◆ kdtree_get_pt()

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
double muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::kdtree_get_pt ( const size_t  idx,
int  dim 
) const
inline

◆ query()

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
std::pair<std::vector<IndexType>, std::vector<double> > muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::query ( Eigen::VectorXd const &  query_point,
const size_t  num_closest,
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 54 of file FlannCache.h.

References muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::index.

◆ UpdateIndex()

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
void muq::Modeling::DynamicKDTreeAdaptor< Distance, IndexType >::UpdateIndex ( const int  leaf_max_size = 10)
inline

Friends And Related Function Documentation

◆ FlannCache

template<class Distance = nanoflann::metric_L2, typename IndexType = size_t>
friend class FlannCache
friend

Definition at line 22 of file FlannCache.h.

Member Data Documentation

◆ index

◆ m_data


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