Gadget
src
include
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
11
class
FormulaMatrix
{
12
public
:
16
FormulaMatrix
() {
nrow
= 0;
v
= 0; };
23
FormulaMatrix
(
int
nr,
int
nc,
Formula
initial);
30
FormulaMatrix
(
int
nr,
int
nc,
double
initial);
35
~FormulaMatrix
();
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
;
87
FormulaVector
**
v
;
88
};
89
90
#endif
FormulaMatrix
This class implements a dynamic vector of FormulaVector values.
Definition:
formulamatrix.h:11
FormulaMatrix::nrow
int nrow
This is number of rows of the vector.
Definition:
formulamatrix.h:83
FormulaMatrix::Inform
void Inform(Keeper *keeper)
This function will inform Keeper of the values of the stored Formula.
Definition:
formulamatrix.cc:79
FormulaMatrix::FormulaMatrix
FormulaMatrix()
This is the default FormulaMatrix constructor.
Definition:
formulamatrix.h:16
FormulaMatrix::Nrow
int Nrow() const
This will return the number of rows of the vector.
Definition:
formulamatrix.h:47
FormulaMatrix::~FormulaMatrix
~FormulaMatrix()
This is the FormulaMatrix destructor.
Definition:
formulamatrix.cc:26
FormulaMatrix::v
FormulaVector ** v
This is the vector of FormulaVector values.
Definition:
formulamatrix.h:87
FormulaMatrix::AddRows
void AddRows(int add, int length, Formula value)
This will add new entries to the vector.
Definition:
formulamatrix.cc:35
FormulaMatrix::operator[]
FormulaVector & operator[](int pos)
This will return the value of an element of the vector.
Definition:
formulamatrix.h:53
FormulaMatrix::Ncol
int Ncol(int i=0) const
This will return the number of columns in row i of the vector.
Definition:
formulamatrix.h:42
FormulaVector
This class implements a dynamic vector of Formula values.
Definition:
formulavector.h:10
FormulaVector::Size
int Size() const
This will return the size of the vector.
Definition:
formulavector.h:56
Formula
This is the class used to calculate the value of the variables used in the model simulation.
Definition:
formula.h:18
Keeper
This is the class used to store information about the variables that are used in model simulation.
Definition:
keeper.h:17
formulavector.h
intvector.h
Generated by
1.9.1