#include <point-set-list.h>
Inheritance diagram for PointSetList:
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:
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 PointSet & | operator[] (int index) const=0 |
Returns a const ref to the <index>th PointSet. | |
const Feature & | GetFeature (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. |
virtual ~PointSetList | ( | ) | [inline, virtual] |
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 |
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.
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.