Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

ArrayGenSimplest_Type.h

Go to the documentation of this file.
00001 
00005 class ArrayGenSimplest(Type) : public virtual VecSimplest(Type)
00006 
00007 {
00008 protected:
00009 
00010   int      ndim;   
00011   Ptv(int) nm;     
00012   Ptv(int) bm;     
00013   int      nm1;    
00014   int      nm1nm2; 
00015   int      bm0;    
00016 
00017   int   local_index;             
00018   int   current_iterator_index;  
00019 
00020   int   totalLength (const Ptv(int)& n);
00021 
00022   void  init (int n1);
00023   void  init (int n1, int n2);
00024   void  init (int n1, int n2, int n3);
00025   void  init (const Ptv(int)& n);
00026 
00027   
00028   bool redim (Type* a, int n, int base = 0);
00029   bool compatible (const VecSimplest(Type)& X) const;
00030 
00031   
00032   int elmNo (const Ptv(int)& index, int base) const;
00033 
00034 public:
00035 
00036   ArrayGenSimplest(Type) ();
00037   ArrayGenSimplest(Type) (int n1);
00038   ArrayGenSimplest(Type) (int n1, int n2);
00039   ArrayGenSimplest(Type) (int n1, int n2, int n3);
00040   ArrayGenSimplest(Type) (const Ptv(int)& n);      
00041  ~ArrayGenSimplest(Type) () {}
00042 
00043   bool redim (int n1);                             
00044   bool redim (int n1, int n2);                     
00045   bool redim (int n1, int n2, int n3);             
00046   bool redim (const Ptv(int)& n);                  
00047                                                    
00048 
00049   bool compatible (const ArrayGenSimplest(Type)& a, bool error_message = true);
00050 
00051   void setBase  (int b1);
00052   void setBase  (int b1, int b2);
00053   void setBase  (int b1, int b2, int b3);
00054   void setBase  (const Ptv(int)& b);
00055 
00056   
00057   
00058   
00059 
00060   
00061   void getBase  (int& b1) const;
00062   void getBase  (int& b1, int& b2) const;
00063   void getBase  (int& b1, int& b2, int& b3) const;
00064   void getBase  (Ptv(int)& b) const;
00065 
00066   
00067   void getMaxI  (int& n1) const;
00068   void getMaxI  (int& n1, int& n2) const;
00069   void getMaxI  (int& n1, int& n2, int& n3) const;
00070   void getMaxI  (Ptv(int)& n) const;
00071 
00072   int  getNoIndices () const;
00073 
00074   
00075   void getDim   (int& n1) const;                    
00076   void getDim   (int& n1, int& n2) const;           
00077   void getDim   (int& n1, int& n2, int& n3) const;  
00078   void getDim   (Ptv(int)& n) const;                
00079                                                     
00080 
00081   void indexOk1 (int i, const char* message = NULL) const; 
00082   void indexOk  (int i, const char* message = NULL) const;
00083   void indexOk  (int i, int j, const char* message = NULL) const;
00084   void indexOk  (int i, int j, int k, const char* message = NULL) const;
00085   void indexOk  (const Ptv(int)& index, const char* message = NULL) const;
00086 
00087   String arraySize () const;
00088 
00089         Type& singleIndex1 (int i);          
00090   const Type& singleIndex1 (int i) const;
00091 
00092   
00093   int multiple2single (int i) const;
00094   int multiple2single (int i,int j) const;
00095   int multiple2single (int i,int j,int k) const;
00096   int multiple2single (const Ptv(int)& index) const;
00097 
00098   int length1D() const     { return nm1;   }
00099   int length1Dx2D() const  { return nm1nm2;}
00100 
00101   
00102   void setLocalIndex (int i) const;
00103   void setLocalIndex (int i,int j) const;
00104   void setLocalIndex (int i,int j,int k) const;
00105   void setLocalIndex (const Ptv(int)& index) const;
00106 
00107   
00108   int getLocalIndex() const { return local_index; }
00109 
00110   
00111         Type& local (int i);
00112         Type& local (int i, int j);
00113         Type& local (int i, int j, int k);
00114         Type& local (const Ptv(int)& index);
00115   const Type& local (int i) const;
00116   const Type& local (int i, int j) const;
00117   const Type& local (int i, int j, int k) const;
00118   const Type& local (const Ptv(int)& index) const;
00119 
00120 
00121         Type& operator () (int i);
00122         Type& operator () (int i, int j);
00123         Type& operator () (int i, int j, int k);
00124         Type& operator () (const Ptv(int)& index);
00125   const Type& operator () (int i) const;
00126   const Type& operator () (int i, int j) const;
00127   const Type& operator () (int i, int j, int k) const;
00128   const Type& operator () (const Ptv(int)& index) const;
00129 
00130 
00131   void startIterator ();
00132   bool nextEntry ();             
00133                                     
00134         Type& thisEntry ();         
00135   const Type& thisEntry () const;   
00136 
00137   
00138   ArrayGenSimplest(Type) (const ArrayGenSimplest(Type)& v);
00139   void operator =        (const ArrayGenSimplest(Type)& v);
00140 };
00141 
00142 

Copyright © 2003 inuTech GmbH. All rights reserved.