Gadget
popratiomatrix.h
Go to the documentation of this file.
1 #ifndef popratiomatrix_h
2 #define popratiomatrix_h
3 
4 #include "intvector.h"
5 #include "popratiovector.h"
6 
12 public:
16  PopRatioMatrix() { nrow = 0; v = 0; };
23  PopRatioMatrix(int nr, int nc, PopRatio initial);
28  PopRatioMatrix(const PopRatioMatrix& initial);
40  int Ncol(int i = 0) const { return v[i]->Size(); };
45  int Nrow() const { return nrow; };
51  PopRatioVector& operator [] (int pos) { return *v[pos]; };
57  const PopRatioVector& operator [] (int pos) const { return *v[pos]; };
64  void AddRows(int add, int length, PopRatio value);
70  void Delete(int pos);
71 protected:
75  int nrow;
80 };
81 
82 #endif
This class implements a dynamic vector of PopRatioVector values.
Definition: popratiomatrix.h:11
int nrow
This is number of rows of the vector.
Definition: popratiomatrix.h:75
~PopRatioMatrix()
This is the PopRatioMatrix destructor.
Definition: popratiomatrix.cc:24
void Delete(int pos)
This will delete an entry from the vector.
Definition: popratiomatrix.cc:57
void AddRows(int add, int length, PopRatio value)
This will add new entries to the vector.
Definition: popratiomatrix.cc:34
int Nrow() const
This will return the number of rows of the vector.
Definition: popratiomatrix.h:45
PopRatioVector ** v
This is the vector of PopRatioVector values.
Definition: popratiomatrix.h:79
PopRatioMatrix()
This is the default PopRatioMatrix constructor.
Definition: popratiomatrix.h:16
PopRatioVector & operator[](int pos)
This will return the value of an element of the vector.
Definition: popratiomatrix.h:51
int Ncol(int i=0) const
This will return the number of columns in row i of the vector.
Definition: popratiomatrix.h:40
This class implements a dynamic vector of PopRatio values.
Definition: popratiovector.h:10
int Size() const
This will return the size of the vector.
Definition: popratiovector.h:53
This is the class used to store information about the number of tagged fish in a population cell of a...
Definition: popratio.h:10