Gadget
addresskeepermatrix.h
Go to the documentation of this file.
1 #ifndef addresskeepermatrix_h
2 #define addresskeepermatrix_h
3 
4 #include "intvector.h"
5 #include "addresskeepervector.h"
6 
12 public:
16  AddressKeeperMatrix() { nrow = 0; v = 0; };
26  void resize();
31  int Nrow() const { return nrow; };
38  int Ncol(int i = 0) const { return v[i]->Size(); };
44  void Delete(int pos);
50  AddressKeeperVector& operator [] (int pos) { return *v[pos]; };
56  const AddressKeeperVector& operator [] (int pos) const { return *v[pos]; };
57 protected:
61  int nrow;
66 };
67 
68 #endif
This class implements a dynamic vector of AddressKeeperVector values.
Definition: addresskeepermatrix.h:11
AddressKeeperVector ** v
This is the vector of AddressKeeperVector values.
Definition: addresskeepermatrix.h:65
void resize()
This will add one new empty entry to the vector.
Definition: addresskeepermatrix.cc:14
int Ncol(int i=0) const
This will return the number of columns in row i of the vector.
Definition: addresskeepermatrix.h:38
int Nrow() const
This will return the number of rows of the vector.
Definition: addresskeepermatrix.h:31
int nrow
This is number of rows of the vector.
Definition: addresskeepermatrix.h:56
AddressKeeperVector & operator[](int pos)
This will return the value of an element of the vector.
Definition: addresskeepermatrix.h:50
~AddressKeeperMatrix()
This is the AddressKeeperMatrix destructor.
Definition: addresskeepermatrix.cc:4
void Delete(int pos)
This will delete an entry from the vector.
Definition: addresskeepermatrix.cc:29
AddressKeeperMatrix()
This is the default AddressKeeperMatrix constructor.
Definition: addresskeepermatrix.h:16
This class implements a dynamic vector of AddressKeeper values.
Definition: addresskeepervector.h:10
int Size() const
This will return the size of the vector.
Definition: addresskeepervector.h:36