Template Class KDTreeIndex

Class Documentation

template<int kDimVectors>
class loop_closure::kd_tree_index::KDTreeIndex

Public Types

typedef Eigen::Matrix<float, kDimVectors, 1> DescriptorType
typedef Eigen::Matrix<float, kDimVectors, Eigen::Dynamic> DescriptorMatrixType
typedef Nabo::NearestNeighbourSearch<float> NNSearch

Public Functions

inline KDTreeIndex()
inline void Clear()
inline int GetNumDescriptorsInIndex() const
inline void AddDescriptors(const DescriptorMatrixType &descriptors)
inline void RefreshIndex() const
inline void GetNNearestNeighbors(const Eigen::MatrixXf &query_features, int num_neighbors, Eigen::MatrixXi *indices, Eigen::MatrixXf *distances) const

Public Static Attributes

static constexpr int kCollectTouchStatistics = 0
static constexpr unsigned kSearchOptionsDefault = NNSearch::ALLOW_SELF_MATCH | NNSearch::SORT_RESULTS
static constexpr float kSearchNNEpsilon = 0.1

Protected Attributes

mutable std::shared_ptr<NNSearch> index_
mutable Eigen::MatrixXf index_data_
mutable std::vector<std::shared_ptr<Eigen::MatrixXf>> pending_descriptor_blocks_