Gadget
agebandmatrixratio.h
Go to the documentation of this file.
1 #ifndef agebandmatrixratio_h
2 #define agebandmatrixratio_h
3 
4 #include "popratio.h"
5 #include "lengthgroup.h"
6 #include "popratiomatrix.h"
7 #include "popratioindexvector.h"
8 #include "agebandmatrix.h"
10 #include "charptrvector.h"
11 #include "gadget.h"
12 
13 class Maturity;
14 
16 public:
17  AgeBandMatrixRatio(int age, const IntVector& minl, const IntVector& size);
18  AgeBandMatrixRatio(int age, const PopRatioMatrix& initial);
19  AgeBandMatrixRatio(int age, const PopRatioIndexVector& initial);
20  AgeBandMatrixRatio(const AgeBandMatrixRatio& initial);
21  AgeBandMatrixRatio() { minage = 0; nrow = 0; v = 0; };
23  int minAge() const { return minage; };
24  int maxAge() const { return minage + nrow - 1; };
25  int Nrow() const { return nrow; };
26  int minLength(int age) const { return v[age - minage]->minCol(); };
27  int maxLength(int age) const { return v[age - minage]->maxCol(); };
28  void IncrementAge(const AgeBandMatrix& Total);
29  void Grow(const DoubleMatrix& Lgrowth, const AgeBandMatrix& Total);
30  void Grow(const DoubleMatrix& Lgrowth, const AgeBandMatrix& Total, Maturity* const Mat, int area);
31  PopRatioIndexVector& operator [] (int age) { return *(v[age - minage]); };
32  const PopRatioIndexVector& operator [] (int age) const { return *(v[age - minage]); };
33  void updateRatio(const AgeBandMatrix& Total);
34  void updateNumbers(const AgeBandMatrix& Total);
35  void updateAndTagLoss(const AgeBandMatrix& Total, const DoubleVector& tagloss);
36  int numTagExperiments() const;
37  void setToZero();
38 protected:
39  int minage;
40  int nrow;
42 };
43 
44 #endif
Definition: agebandmatrixratio.h:15
void updateRatio(const AgeBandMatrix &Total)
Definition: agebandmatrixratiomemberfunctions.cc:51
int minLength(int age) const
Definition: agebandmatrixratio.h:26
int Nrow() const
Definition: agebandmatrixratio.h:25
int minage
Definition: agebandmatrixratio.h:39
PopRatioIndexVector ** v
Definition: agebandmatrixratio.h:41
void setToZero()
Definition: agebandmatrixratio.cc:53
~AgeBandMatrixRatio()
Definition: agebandmatrixratio.cc:37
void IncrementAge(const AgeBandMatrix &Total)
Definition: agebandmatrixratiomemberfunctions.cc:77
int nrow
Definition: agebandmatrixratio.h:40
void updateNumbers(const AgeBandMatrix &Total)
Definition: agebandmatrixratiomemberfunctions.cc:25
int numTagExperiments() const
Definition: agebandmatrixratio.cc:47
PopRatioIndexVector & operator[](int age)
Definition: agebandmatrixratio.h:31
int minAge() const
Definition: agebandmatrixratio.h:23
AgeBandMatrixRatio(int age, const PopRatioMatrix &initial)
int maxLength(int age) const
Definition: agebandmatrixratio.h:27
void updateAndTagLoss(const AgeBandMatrix &Total, const DoubleVector &tagloss)
Definition: agebandmatrixratiomemberfunctions.cc:7
void Grow(const DoubleMatrix &Lgrowth, const AgeBandMatrix &Total)
Definition: taggrow.cc:5
AgeBandMatrixRatio()
Definition: agebandmatrixratio.h:21
int maxAge() const
Definition: agebandmatrixratio.h:24
This class implements a vector of PopInfoIndexVector values, indexed from minage not 0.
Definition: agebandmatrix.h:15
This class implements a dynamic vector of DoubleVector values.
Definition: doublematrix.h:11
This class implements a dynamic vector of double values.
Definition: doublevector.h:11
This class implements a dynamic vector of int values.
Definition: intvector.h:11
This is the base class used to calculate the maturity of a stock within the model.
Definition: maturity.h:22
This class implements a dynamic vector of PopRatioVector values, indexed from minpos not 0.
Definition: popratioindexvector.h:10
int minCol() const
This will return the index of the vector.
Definition: popratioindexvector.h:63
int maxCol() const
This will return the length of the vector.
Definition: popratioindexvector.h:68
This class implements a dynamic vector of PopRatioVector values.
Definition: popratiomatrix.h:11