Gadget
formulamatrix.h
Go to the documentation of this file.
1 #ifndef formulamatrix_h
2 #define formulamatrix_h
3 
4 #include "intvector.h"
5 #include "formulavector.h"
6 
12 public:
16  FormulaMatrix() { nrow = 0; v = 0; };
23  FormulaMatrix(int nr, int nc, Formula initial);
30  FormulaMatrix(int nr, int nc, double initial);
42  int Ncol(int i = 0) const { return v[i]->Size(); };
47  int Nrow() const { return nrow; };
53  FormulaVector& operator [] (int pos) { return *v[pos]; };
59  const FormulaVector& operator [] (int pos) const { return *v[pos]; };
66  void AddRows(int add, int length, Formula value);
73  void AddRows(int add, int length, double value);
78  void Inform(Keeper* keeper);
79 protected:
83  int nrow;
88 };
89 
90 #endif
This class implements a dynamic vector of FormulaVector values.
Definition: formulamatrix.h:11
int nrow
This is number of rows of the vector.
Definition: formulamatrix.h:83
void Inform(Keeper *keeper)
This function will inform Keeper of the values of the stored Formula.
Definition: formulamatrix.cc:79
FormulaMatrix()
This is the default FormulaMatrix constructor.
Definition: formulamatrix.h:16
int Nrow() const
This will return the number of rows of the vector.
Definition: formulamatrix.h:47
~FormulaMatrix()
This is the FormulaMatrix destructor.
Definition: formulamatrix.cc:26
FormulaVector ** v
This is the vector of FormulaVector values.
Definition: formulamatrix.h:87
void AddRows(int add, int length, Formula value)
This will add new entries to the vector.
Definition: formulamatrix.cc:35
FormulaVector & operator[](int pos)
This will return the value of an element of the vector.
Definition: formulamatrix.h:53
int Ncol(int i=0) const
This will return the number of columns in row i of the vector.
Definition: formulamatrix.h:42
This class implements a dynamic vector of Formula values.
Definition: formulavector.h:10
int Size() const
This will return the size of the vector.
Definition: formulavector.h:56
This is the class used to calculate the value of the variables used in the model simulation.
Definition: formula.h:18
This is the class used to store information about the variables that are used in model simulation.
Definition: keeper.h:17