Array.h
Go to the documentation of this file.
00001 #ifndef __NEW_MAT_ARRAY_H__
00002 #define __NEW_MAT_ARRAY_H__
00003 
00004 // **************** a very simple integer array class ********************/
00005 
00010 
00011 class SimpleIntArray : public Janitor
00012 {
00013 protected:
00014    int* a;                    
00015    int n;                     
00016 public:
00017    SimpleIntArray(int xn);    
00018    SimpleIntArray() : a(0), n(0) {}  
00019    ~SimpleIntArray();         
00020    int& operator[](int i);    
00021    int operator[](int i) const;
00023    void operator=(int ai);    
00024    void operator=(const SimpleIntArray& b);
00026    SimpleIntArray(const SimpleIntArray& b);
00028    int Size() const { return n; }
00030    int size() const { return n; }
00032    int* Data() { return a; }  
00033    const int* Data() const { return a; }  
00034    int* data() { return a; }  
00035    const int* data() const { return a; }  
00036    const int* const_data() const { return a; }  
00037    void resize(int i, bool keep = false);
00039    void ReSize(int i, bool keep = false) { resize(i, keep); }
00041    void resize_keep(int i) { resize(i, true); }
00043    void cleanup() { resize(0); }   
00044    void CleanUp() { resize(0); }   
00045    NEW_DELETE(SimpleIntArray)
00046 };
00047 
00048 // ********************** C subscript classes ****************************
00049 
00051 class RealStarStar
00052 {
00053    Real** a;
00054 public:
00055    RealStarStar(Matrix& A);
00056    ~RealStarStar() { delete [] a; }
00057    operator Real**() { return a; }
00058 };
00059 
00061 class ConstRealStarStar
00062 {
00063    const Real** a;
00064 public:
00065    ConstRealStarStar(const Matrix& A);
00066    ~ConstRealStarStar() { delete [] a; }
00067    operator const Real**() { return a; }
00068 };
00069 
00070 
00071 #endif
00072 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


lo
Author(s): U. Klank
autogenerated on Thu May 23 2013 07:34:44