template struct mrpt::math::KDTreeCapable::TKDTreeDataHolder
Internal structure with the KD-tree representation (mainly used to avoid copying pointers with the = operator)
template <int _DIM = -1> struct TKDTreeDataHolder { // typedefs typedef nanoflann::KDTreeSingleIndexAdaptor<metric_t, Derived, _DIM, std::size_t> kdtree_index_t; // fields std::unique_ptr<kdtree_index_t> index; size_t m_dim = _DIM; size_t m_num_points = 0; // construction TKDTreeDataHolder(); TKDTreeDataHolder(const TKDTreeDataHolder&); // methods TKDTreeDataHolder& operator = (const TKDTreeDataHolder& o); void clear(); };
Fields
std::unique_ptr<kdtree_index_t> index
nullptr or the up-to-date index
size_t m_dim = _DIM
Dimensionality.
typ: 2,3
Construction
TKDTreeDataHolder(const TKDTreeDataHolder&)
Copy constructor: It actually does NOT copy the kd-tree, a new object will be created if required!
Methods
TKDTreeDataHolder& operator = (const TKDTreeDataHolder& o)
Copy operator: It actually does NOT copy the kd-tree, a new object will be created if required!
void clear()
Free memory (if allocated)