#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 | |
bool | GetMembershipPath (const Point &f, LargeIndex *out_path, vector< double > *out_distances) |
For a new feature, find which bin it would be placed in according to the HierarchicalClusterer. | |
Protected Attributes | |
const HierarchicalClusterer & | clusterer_ |
const Tree< PointTreeNode > & | 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.
bool GetMembershipPath | ( | const Point & | f, | |
LargeIndex * | out_path, | |||
vector< double > * | out_distances | |||
) | [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 child index to traverse. The first element is 0 by default, since the root of the tree has no parent. For instance, if the returned LargeIndex is [0 3 9], then the path down the tree is: root R, 3rd child of R, followed by 9th child of that node.
The returned vector of doubles gives the distance to the corresponding center at each level, according to distance_computer_. Thus, the first element is the distance from the point <f> to the center of the root node, etc.
The pointers must not be NULL.
Returns true on success, which is always.
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 Tree<PointTreeNode>& centers_ [protected, inherited] |
The centers extracted from clusterer_.
const DistanceComputer& distance_computer_ [protected, inherited] |