point-set.h

Go to the documentation of this file.
00001 // Copyright 2007, Massachusetts Institute of Technology.
00002 // The use of this code is permitted for research only. There is
00003 // absolutely no warranty for this software.
00004 //
00005 // Author: John Lee (jjl@mit.edu)
00006 //
00007 #ifndef POINT_SET_POINT_SET_H
00008 #define POINT_SET_POINT_SET_H
00009 
00010 #include <vector>
00011 #include "point_set/feature.h"
00012 
00013 using namespace std;
00014 
00015 namespace libpmk {
00017 
00024 class PointSet
00025 {
00026  public:
00028    PointSet(int feature_dim);
00029    
00030    int GetNumFeatures() const;
00031    int GetFeatureDim() const;
00032 
00034    Feature GetFeature(int index) const;
00035 
00037    Feature& operator[](int index);
00038 
00040    const Feature& operator[](int index) const;
00041 
00043    void AddFeature(const Feature& feature);
00044 
00046    void RemoveFeature(int index);
00047 
00049    void SetFeature(int index, const Feature& feature);
00050 
00052 
00062    void WriteToStream(ostream& output_stream) const;
00063 
00065 
00071    void ReadFromStream(istream& input_stream);
00072 
00073  private:
00074    int feature_dim_;
00075    vector<Feature> features_;
00076 };
00077 }  // namespace libpmk
00078 #endif  // POINT_SET_POINT_SET_H

Generated on Wed May 2 11:17:12 2007 for libpmk by  doxygen 1.5.1