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.
const Kmeanskmeans () const
 Get the k-means clusterer.
Kmeanskmeans ()
 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 14 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 10 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 9 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 8 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() 
) [inline]

Constructor.

Parameters:
zero Object representing zero in the feature space
d Functor for calculating squared distance

Definition at line 56 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 
) [inline]

Build a new vocabulary tree.

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

Parameters:
training_features The set of training features to cluster.
k The branching factor, or max children of any node.
levels The number of levels in the tree.

Definition at line 64 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 37 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 35 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 32 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 41 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 40 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 42 of file tree_builder.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs


vocabulary_tree
Author(s): Patrick Mihelich
autogenerated on Fri Jan 11 09:14:12 2013