Template Class InvertedMultiIndex

Class Documentation

template<int kDimSubVectors>
class loop_closure::inverted_multi_index::InvertedMultiIndex

Public Types

typedef Eigen::Matrix<float, 2 * kDimSubVectors, 1> DescriptorType
typedef Eigen::Matrix<float, kDimSubVectors, 1> SubDescriptorType
typedef Eigen::Matrix<float, 2 * kDimSubVectors, Eigen::Dynamic> DescriptorMatrixType
typedef common::InvertedFile<float, 2 * kDimSubVectors> InvFile

Public Functions

inline InvertedMultiIndex(const Eigen::MatrixXf &words_1, const Eigen::MatrixXf &words_2, int num_closest_words_for_nn_search)
inline void SetNumClosestWordsForNNSearch(int num_closest_words_for_nn_search)
inline int GetNumDescriptorsInIndex() const
inline void Clear()
inline void AddDescriptors(const DescriptorMatrixType &descriptors)
template<typename DerivedQuery, typename DerivedIndices, typename DerivedDistances>
inline void GetNNearestNeighbors(const Eigen::MatrixBase<DerivedQuery> &query_feature, int num_neighbors, const Eigen::MatrixBase<DerivedIndices> &out_indices, const Eigen::MatrixBase<DerivedDistances> &out_distances) const
inline void serialize(proto::InvertedMultiIndex *proto_inverted_multi_index) const
inline void deserialize(const proto::InvertedMultiIndex proto_inverted_multi_index)

Protected Attributes

Eigen::MatrixXf words_1_
Eigen::MatrixXf words_2_
std::shared_ptr<common::NNSearch> words_1_index_
std::shared_ptr<common::NNSearch> words_2_index_
int num_closest_words_for_nn_search_
std::unordered_map<int, int> word_index_map_
Aligned<std::vector, InvFile> inverted_files_
int max_db_descriptor_index_

Friends

friend class matching_based_loopclosure::MatchingBasedLoopDetectorSerializer