PointSetList Class Reference

#include <point-set-list.h>

Inheritance diagram for PointSetList:

MutablePointSetList OnDiskPointSetList List of all members.

Detailed Description

Abstract interface for a list of PointSet.

All Features contained in any PointSetList must have the same dimension. When serialized, a PointSetList takes on the following format:

Equivalently, at a higher level:

See also:
PointSet


Public Member Functions

virtual ~PointSetList ()
virtual int GetNumPointSets () const=0
 Get the total number of PointSets in this PointSetList.
virtual int GetNumPoints () const=0
 Get the total number of Features in this PointSetList.
virtual int GetFeatureDim () const=0
 Get the dim of every Feature in this PointSetList.
virtual vector< int > GetSetCardinalities () const=0
 Get the number of Features in each PointSet.
virtual const PointSetoperator[] (int index) const=0
 Returns a const ref to the <index>th PointSet.
const FeatureGetFeature (int index) const
 Returns the <index>th Feature in the PointSetList.
pair< int, int > GetFeatureIndices (int index) const
 Locate a Feature in a PointSet.
void GetPointRefs (vector< PointRef > *out_refs) const
 Get PointRefs to every Feature in this PointSetList.
void WriteToStream (ostream &output_stream) const
 Writes the entire PointSetList to a stream.
void WriteHeaderToStream (ostream &output_stream) const
 Writes just the serialized header to a stream.
void WritePointSetsToStream (ostream &output_stream) const
 Writes the point sets (without a header) sequentially to a stream.
void WriteToFile (const char *output_file) const
 Writes the entire PointSetList to a file.


Constructor & Destructor Documentation

virtual ~PointSetList (  )  [inline, virtual]


Member Function Documentation

virtual int GetNumPointSets (  )  const [pure virtual]

Get the total number of PointSets in this PointSetList.

Implemented in MutablePointSetList, and OnDiskPointSetList.

virtual int GetNumPoints (  )  const [pure virtual]

Get the total number of Features in this PointSetList.

This is the sum of GetNumFeatures() over all PointSets in in this PointSetList.

Implemented in MutablePointSetList, and OnDiskPointSetList.

virtual int GetFeatureDim (  )  const [pure virtual]

Get the dim of every Feature in this PointSetList.

Implemented in MutablePointSetList, and OnDiskPointSetList.

virtual vector<int> GetSetCardinalities (  )  const [pure virtual]

Get the number of Features in each PointSet.

Returns a vector of size this.GetNumPointSets(), where the nth element is the number of Features in the nth PointSet in this PointSetList.

Implemented in MutablePointSetList, and OnDiskPointSetList.

virtual const PointSet& operator[] ( int  index  )  const [pure virtual]

Returns a const ref to the <index>th PointSet.

Implemented in MutablePointSetList, and OnDiskPointSetList.

const Feature & GetFeature ( int  index  )  const

Returns the <index>th Feature in the PointSetList.

We can also think of a PointSetList as a long vector of Features if we ignore the PointSet boundaries, so you can reference individual features of a PointSetList through this.

pair< int, int > GetFeatureIndices ( int  index  )  const

Locate a Feature in a PointSet.

Given an index specifying which feature we are referring to, return which PointSet it belongs to, as well as the index into that PointSet that the Feature belongs to.

void GetPointRefs ( vector< PointRef > *  out_refs  )  const

Get PointRefs to every Feature in this PointSetList.

Requires out_refs != NULL. Makes out_refs a vector of size GetNumPoints(), where the nth element is a PointRef pointing to the nth Feature (i.e., points to GetFeature(n)). If out_refs has something in it beforehand, it will be cleared prior to filling it.

See also:
PointRef

void WriteToStream ( ostream &  output_stream  )  const

Writes the entire PointSetList to a stream.

See the detailed description of PointSetList for the format.

void WriteHeaderToStream ( ostream &  output_stream  )  const

Writes just the serialized header to a stream.

void WritePointSetsToStream ( ostream &  output_stream  )  const

Writes the point sets (without a header) sequentially to a stream.

void WriteToFile ( const char *  output_file  )  const

Writes the entire PointSetList to a file.

See detailed description of PointSetList for the format.


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