GlobalVGPyramidMaker Class Reference

#include <global-vg-pyramid-maker.h>

Inheritance diagram for GlobalVGPyramidMaker:

VGPyramidMaker PyramidMaker List of all members.

Detailed Description

Makes pyramids with bin sizes determined by a particular set of points.


Public Member Functions

 GlobalVGPyramidMaker (const HierarchicalClusterer &clusterer, const DistanceComputer &distance_computer)
 ~GlobalVGPyramidMaker ()
void Preprocess (const PointSetList &point_sets)
 Initialize the global bin sizes.
virtual MultiResolutionHistogramMakePyramid (const PointSet &point_set)
 Turn a single PointSet into a MultiResolutionHistogram.
void ReadFromStream (istream &input_stream)
 Initialize the global bin sizes.
void ReadFromFile (const char *filename)
 Initialize the global bin sizes.
void WriteToStream (ostream &output_stream) const
 Write the global bin sizes to a stream.
void WriteToFile (const char *filename) const
 Write the global bin sizes to a file.
vector< MultiResolutionHistogram * > MakePyramids (const PointSetList &psl)
 Turn a list of PointSets into a bunch of MultiResolutionHistograms.

Protected Member Functions

virtual pair< LargeIndex,
vector< double > > 
GetMembershipPath (const Feature &f)
 Get the membership data relative to the global pyramid data.

Protected Attributes

const HierarchicalClustererclusterer_
const PointSetListcenters_
 The centers extracted from clusterer_.
const DistanceComputerdistance_computer_

Classes

class  IndexNode


Constructor & Destructor Documentation

GlobalVGPyramidMaker ( const HierarchicalClusterer clusterer,
const DistanceComputer distance_computer 
)

~GlobalVGPyramidMaker (  ) 


Member Function Documentation

void Preprocess ( const PointSetList point_sets  ) 

Initialize the global bin sizes.

This takes O(n^2) time, where n is the total number of points in <point_sets>. This is because at the top level bin, it computes the furthest pair between any of the two points to set the bin size.

Rather than doing this every single time, you may also call ReadFromStream() which will read already-preprocessed data.

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.

void ReadFromStream ( istream &  input_stream  ) 

Initialize the global bin sizes.

Can be called in lieu of Preprocess(). Aborts if the stream is bad.

void ReadFromFile ( const char *  filename  ) 

Initialize the global bin sizes.

See also:
ReadFromStream

void WriteToStream ( ostream &  output_stream  )  const

Write the global bin sizes to a stream.

Requires Preprocess() or ReadFromStream() to be called first. Aborts if the stream is bad.

void WriteToFile ( const char *  filename  )  const

Write the global bin sizes to a file.

See also:
WriteToStream

pair< LargeIndex, vector< double > > GetMembershipPath ( const Feature f  )  [protected, virtual]

Get the membership data relative to the global pyramid data.

This function is overridden so that only paths that were present in the point sets that this was constructed with can appear. Otherwise, this function does the same thing as its parent VGPyramidMaker::GetMembershipPath().

See also:
VGPyramidMaker::GetMembershipPath()

Reimplemented from VGPyramidMaker.

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.


Member Data Documentation

const HierarchicalClusterer& clusterer_ [protected, inherited]

const PointSetList& centers_ [protected, inherited]

The centers extracted from clusterer_.

const DistanceComputer& distance_computer_ [protected, inherited]


The documentation for this class was generated from the following files:
Generated on Wed May 2 11:17:13 2007 for libpmk by  doxygen 1.5.1