Template Class VocabularyTree

Inheritance Relationships

Derived Type

Class Documentation

template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
class loop_closure::VocabularyTree

Subclassed by loop_closure::MutableVocabularyTree< Feature, Distance, FeatureAllocator >

Public Types

enum [anonymous]

Values:

enumerator kSerializationVersion
typedef Distance::result_type DistanceType

Public Functions

VocabularyTree(Distance d = Distance())
VocabularyTree(const std::string &file, Distance d = Distance())
Word Quantize(const Feature &f) const
void GetNearestNeighborTopLevel(const Feature &f, unsigned int num_nearest_neighbors, std::vector<Word> *nearest_neighbors, std::vector<DistanceType> *distances) const
void GetNearestNeighborTopLevel(const Eigen::MatrixXf &features, unsigned int num_nearest_neighbors, std::vector<Word> *nearest_neighbors) const
uint32_t levels() const
uint32_t splits() const
uint32_t words() const
uint32_t CountLeaves() const
void Clear()
void Save(const std::string &file) const
bool Load(const std::string &file)
void Save(std::ofstream *out_stream) const
bool Load(std::ifstream *in_stream)
bool IsBinaryEqual(const VocabularyTree<Feature, Distance, FeatureAllocator> &other) const
void SetNodeCounts()

Protected Types

typedef Distance::result_type distance_type
typedef GetSearchAccelerator<Feature, Distance, FeatureAllocator>::type SearchAccelerator

Protected Functions

void InitializeSearchAccelerators()
inline bool Initialized() const

Protected Attributes

std::vector<Feature, FeatureAllocator> centers_
std::vector<uint8_t> valid_centers_
Distance distance_
std::vector<SearchAccelerator> search_accelerators_
uint32_t num_splits_
uint32_t levels_
uint32_t num_words_
uint32_t word_start_