Public Types | Public Member Functions | Protected Attributes
vt::TreeBuilder< Feature, Distance, FeatureAllocator > Class Template Reference

Class for building a new vocabulary by hierarchically clustering a set of training features. More...

#include <tree_builder.h>

List of all members.

Public Types

typedef std::vector< Feature,
FeatureAllocator > 
FeatureVector
typedef SimpleKmeans< Feature,
Distance, FeatureAllocator > 
Kmeans
typedef MutableVocabularyTree
< Feature, Distance,
FeatureAllocator > 
Tree

Public Member Functions

void build (const FeatureVector &training_features, uint32_t k, uint32_t levels)
 Build a new vocabulary tree.
Kmeanskmeans ()
 Get the k-means clusterer.
const Kmeanskmeans () const
 Get the k-means clusterer.
const Treetree () const
 Get the built vocabulary tree.
 TreeBuilder (const Feature &zero=Feature(), Distance d=Distance())
 Constructor.

Protected Attributes

Kmeans kmeans_
Tree tree_
Feature zero_

Detailed Description

template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
class vt::TreeBuilder< Feature, Distance, FeatureAllocator >

Class for building a new vocabulary by hierarchically clustering a set of training features.

Definition at line 17 of file tree_builder.h.


Member Typedef Documentation

template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
typedef std::vector<Feature, FeatureAllocator> vt::TreeBuilder< Feature, Distance, FeatureAllocator >::FeatureVector

Definition at line 22 of file tree_builder.h.

template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
typedef SimpleKmeans<Feature, Distance, FeatureAllocator> vt::TreeBuilder< Feature, Distance, FeatureAllocator >::Kmeans

Definition at line 21 of file tree_builder.h.

template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
typedef MutableVocabularyTree<Feature, Distance, FeatureAllocator> vt::TreeBuilder< Feature, Distance, FeatureAllocator >::Tree

Definition at line 20 of file tree_builder.h.


Constructor & Destructor Documentation

template<class Feature , class Distance , class FeatureAllocator >
vt::TreeBuilder< Feature, Distance, FeatureAllocator >::TreeBuilder ( const Feature zero = Feature(),
Distance  d = Distance() 
)

Constructor.

Parameters:
zeroObject representing zero in the feature space
dFunctor for calculating squared distance

Definition at line 59 of file tree_builder.h.


Member Function Documentation

template<class Feature , class Distance , class FeatureAllocator >
void vt::TreeBuilder< Feature, Distance, FeatureAllocator >::build ( const FeatureVector training_features,
uint32_t  k,
uint32_t  levels 
)

Build a new vocabulary tree.

The number of words in the resulting vocabulary is at most k ^ levels.

Parameters:
training_featuresThe set of training features to cluster.
kThe branching factor, or max children of any node.
levelsThe number of levels in the tree.

Definition at line 67 of file tree_builder.h.

template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
Kmeans& vt::TreeBuilder< Feature, Distance, FeatureAllocator >::kmeans ( ) [inline]

Get the k-means clusterer.

Definition at line 47 of file tree_builder.h.

template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
const Kmeans& vt::TreeBuilder< Feature, Distance, FeatureAllocator >::kmeans ( ) const [inline]

Get the k-means clusterer.

Definition at line 49 of file tree_builder.h.

template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
const Tree& vt::TreeBuilder< Feature, Distance, FeatureAllocator >::tree ( ) const [inline]

Get the built vocabulary tree.

Definition at line 44 of file tree_builder.h.


Member Data Documentation

template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
Kmeans vt::TreeBuilder< Feature, Distance, FeatureAllocator >::kmeans_ [protected]

Definition at line 53 of file tree_builder.h.

template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
Tree vt::TreeBuilder< Feature, Distance, FeatureAllocator >::tree_ [protected]

Definition at line 52 of file tree_builder.h.

template<class Feature, class Distance = distance::L2<Feature>, class FeatureAllocator = typename DefaultAllocator<Feature>::type>
Feature vt::TreeBuilder< Feature, Distance, FeatureAllocator >::zero_ [protected]

Definition at line 54 of file tree_builder.h.


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


vocabulary_tree
Author(s): Patrick Mihelich
autogenerated on Thu Jan 2 2014 12:12:26