point-set-list.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_LIST_H
00008 #define POINT_SET_POINT_SET_LIST_H
00009 
00010 #include <assert.h>
00011 #include <vector>
00012 #include <string>
00013 #include <iostream>
00014 #include "point_set/point-set.h"
00015 #include "point_set/point-ref.h"
00016 #include "point_set/point.h"
00017 
00018 using namespace std;
00019 
00020 namespace libpmk {
00021 
00022 class PointRef;
00023 
00025 
00051 class PointSetList {
00052 public:
00053   virtual ~PointSetList() { }
00054 
00056   virtual int point_set_size() const = 0;
00057 
00059 
00063   virtual int point_size() const = 0;
00064 
00066 
00069   virtual int point_dim() const = 0;
00070 
00072 
00080   virtual bool GetSetCardinalities(vector<int>* destination) const;
00081 
00083   const PointSet& operator[](int index) { return point_set(index); }
00084 
00086   virtual const PointSet& point_set(int index) const = 0;
00087 
00089 
00094   const Point& point(int index) const;
00095 
00097 
00105   bool GetPointIndices(int index, int* which_point_set,
00106                        int* which_point) const;
00107 
00109 
00117   void GetPointRefs(vector<PointRef>* out_refs) const;
00118 
00120 
00121   void WriteToStream(ostream& output_stream) const;
00122 
00124   void WriteHeaderToStream(ostream& output_stream) const;
00125 
00127   void WritePointSetsToStream(ostream& output_stream) const;
00128 
00130 
00131   void WriteToFile(const char* output_file) const;
00132 };
00133 }  // namespace libpmk
00134 
00135 #endif  // POINT_SET_POINT_SET_LIST_H

Generated on Fri Sep 21 11:39:04 2007 for libpmk2 by  doxygen 1.5.1