Diffpack Documentation


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

Indicators.h

Go to the documentation of this file.
00001 
00005 class Indicators : public HandleId
00006 
00007 {
00008   friend class GridFE;
00009   friend class GridLattice;
00010 
00011 private:
00012 
00013   MatSimple(char)    indicators; 
00014   VecSimple(String)  names;      
00015   int                nind;       
00016   int                nitems;     
00017 
00018   bool valid (int ind) const; 
00019 
00020 public:
00021   Indicators ();
00022   Indicators (int nitems_, int nind_)  { redim(nitems_, nind_); }
00023   Indicators (const Indicators& b);
00024  ~Indicators () {}
00025   bool ok () const;
00026   bool redim (int nitems, int nind);
00027   void grow (int no_of_additional_inds);
00028   void copyNames (const Indicators& b);
00029   void operator= (const Indicators& b);
00030 
00031   String   getName  (int ind) const;
00032   void     putName (const String& name, int ind);
00033   void     print (Os os) const;
00034   int      getNoInds () const           { return nind; }
00035 
00036   void     set (int item, int ind);
00037   void     clear (int item, int ind);
00038 
00039   void     setCode (int item, long int code);
00040   long int getCode (int item) const;
00041   static long int intersectionCode (long int code1, long int code2);
00042 
00043   bool     on (int item, int ind) const;
00044   
00045   void     fill  (bool onoff)
00046     { onoff == OFF ? indicators.fill('0') : indicators.fill('1'); }
00047 
00048   void     redefine (Is is);
00049 
00050   MatSimple(char)&  indicatorAccess() { return indicators; }
00051 
00052   static void splitDigits (long int number, VecSimple(int)& digits);
00053 };
00054 
00055 

Copyright © 2003 inuTech GmbH. All rights reserved.