#include <input-specific-vg-pyramid-maker.h>
Inheritance diagram for InputSpecificVGPyramidMaker:
Public Member Functions | |
InputSpecificVGPyramidMaker (const HierarchicalClusterer &c, const DistanceComputer &distance_computer) | |
virtual MultiResolutionHistogram * | MakePyramid (const PointSet &point_set) |
Turn a single PointSet into a MultiResolutionHistogram. | |
vector< MultiResolutionHistogram * > | MakePyramids (const PointSetList &psl) |
Turn a list of PointSets into a bunch of MultiResolutionHistograms. | |
Protected Member Functions | |
pair< LargeIndex, vector< double > > | GetMembershipPath (const Feature &f) |
For a new feature, find which bin it would be placed in according to the HierarchicalClusterer. | |
Protected Attributes | |
const HierarchicalClusterer & | clusterer_ |
const PointSetList & | centers_ |
The centers extracted from clusterer_. | |
const DistanceComputer & | distance_computer_ |
InputSpecificVGPyramidMaker | ( | const HierarchicalClusterer & | c, | |
const DistanceComputer & | distance_computer | |||
) |
MultiResolutionHistogram * MakePyramid | ( | const PointSet & | point_set | ) | [virtual] |
Turn a single PointSet into a MultiResolutionHistogram.
This function allocates memory on its own. It is up to the caller to free it.
Implements VGPyramidMaker.
pair< LargeIndex, vector< double > > GetMembershipPath | ( | const Feature & | f | ) | [protected, inherited] |
For a new feature, find which bin it would be placed in according to the HierarchicalClusterer.
The LargeIndex returned is the same size as the number of levels in the tree. Each element of the LargeIndex tells you which element in centers_ that point belongs to. That is, if the returned LargeIndex is [0 3 9], then centers_[0][0] is the root bin, centers_[1][3] is the center corresponding to this point at level 1, centers_[2][9] is the center corresponding to this point at level 2.
The returned vector of doubles gives the distance to the corresponding center at each level, according to distance_computer_.
Reimplemented in GlobalVGPyramidMaker.
vector< MultiResolutionHistogram * > MakePyramids | ( | const PointSetList & | psl | ) | [inherited] |
Turn a list of PointSets into a bunch of MultiResolutionHistograms.
It is up to the caller to free the memory.
const HierarchicalClusterer& clusterer_ [protected, inherited] |
const PointSetList& centers_ [protected, inherited] |
The centers extracted from clusterer_.
const DistanceComputer& distance_computer_ [protected, inherited] |