/home/fwph/code/wurde/rde/core/Subspace.H

Go to the documentation of this file.
00001 #ifndef Subspace_H
00002 #define Subspace_H
00003 
00024 #include <fstream>
00025 #include <Geometry.H>
00026 
00036 template<class T> class NdSubspace;
00037 
00039 typedef NdSubspace<int> ZnSubspace;
00041 typedef NdSubspace<double> RnSubspace;
00042 
00044 
00046 template<class T> class NdSubspace {
00047 public:
00050   explicit NdSubspace(const int dimension)
00051                 : m_dimension(dimension) {}
00052 
00055   NdSubspace(const NdSubspace &subspace)
00056                 : m_dimension(subspace.n()) {}
00057 
00061   NdSubspace &operator=(const NdSubspace &subspace) {
00062                 m_dimension = subspace.n(); return *this;}
00063 
00067         bool operator==(const NdSubspace &subspace) const {
00068                 return m_dimension == subspace.n();}
00069 
00071 
00076   virtual bool interior(const RnPoint &point) const = 0;
00077 
00081   virtual bool boundary(const RnPoint &point) const = 0;
00082 
00087   virtual bool closure(const RnPoint &point) const = 0;
00089 
00091 
00092 
00093   int n() const {return m_dimension;}
00095 
00097 
00098 
00102         virtual void drawGnuplot(const char *const filename,
00103                                                                                                          const int di = 0, const int dj = 1) const {
00104                 std::ofstream out(filename);
00105                 drawGnuplot(out, di, dj);}
00106 
00111         virtual void drawGnuplot(std::ostream &out,
00112                                                                                                          const int di = 0, const int dj = 1) const = 0;
00114 
00115 private:
00116   int m_dimension;
00117 };
00118 
00119 #endif // Subspace_H

Generated on Thu Feb 1 15:31:54 2007 for WURDE by  doxygen 1.5.1