interpollist.h

Go to the documentation of this file.
00001 #ifndef __interpollist_h
00002 #define __interpollist_h
00003 
00004 #include  <vector.h>
00005 #include  "fixarray.h" 
00006 
00007 /*---------------------------------------------------*/
00008 
00009 namespace Gascoigne
00010 {
00011 template <int N>
00012 class InterpolElement : public fixarray<N,int>
00013 {
00014  public:
00015 
00016   int nv;
00017 
00018   InterpolElement() : fixarray<N,int>(), nv(-1) {}
00019   InterpolElement(const InterpolElement& i) : fixarray<N,int>(i), 
00020     nv(i.nv) {}
00021 
00022   InterpolElement(const fixarray<N,int>& f, int n) : 
00023     fixarray<N,int>(f), nv(n) {}
00024 };
00025 
00026 /*---------------------------------------------------*/
00027 
00028 template <int N>
00029 class InterpolationList : public std::vector<InterpolElement<N> >
00030 {
00031   public :
00032     
00033   int  newvertex(int i)        const { return (*this)[i].nv; }
00034   int  oldvertex(int i, int j) const { return (*this)[i][j]; }
00035 
00036   void newentry(int nv, const fixarray<N,int>& w)
00037     {
00038       InterpolElement<N> I(w,nv);
00039       push_back(I);
00040     }
00041 };
00042 }
00043 
00044 #endif

Generated on Thu Sep 14 10:34:37 2006 for Gascoigne by  doxygen 1.4.7