1 : |
agomez |
1 |
#ifndef agebandmatrixratioptrvector_h
|
2 : |
|
|
#define agebandmatrixratioptrvector_h
|
3 : |
|
|
|
4 : |
|
|
#include "popratio.h" |
5 : |
|
|
#include "popratiomatrix.h" |
6 : |
|
|
#include "popratioindexvector.h" |
7 : |
|
|
#include "areatime.h" |
8 : |
|
|
#include "agebandmatrix.h" |
9 : |
|
|
#include "agebandmatrixptrvector.h" |
10 : |
|
|
#include "agebandmatrixratio.h" |
11 : |
|
|
#include "charptrvector.h" |
12 : |
|
|
#include "gadget.h" |
13 : |
|
|
|
14 : |
|
|
class Maturity;
|
15 : |
|
|
|
16 : |
|
|
class AgeBandMatrixRatioPtrVector {
|
17 : |
|
|
public:
|
18 : |
|
|
AgeBandMatrixRatioPtrVector() { size = 0; v = 0; };
|
19 : |
|
|
AgeBandMatrixRatioPtrVector(int size);
|
20 : |
|
|
AgeBandMatrixRatioPtrVector(int size1, int MinAge, const IntVector& minl, const IntVector& size2);
|
21 : |
|
|
~AgeBandMatrixRatioPtrVector();
|
22 : |
|
|
void resize(int add, AgeBandMatrixRatio* matr);
|
23 : |
|
|
void resize(int add, int minage, const IntVector& minl, const IntVector& size);
|
24 : |
|
|
void addTag(AgeBandMatrixPtrVector* initial, const AgeBandMatrixPtrVector& Alkeys, const char* tagname, double tagloss);
|
25 : |
|
|
void addTag(const char* tagname);
|
26 : |
|
|
void deleteTag(const char* tagname);
|
27 : |
|
|
int Size() const { return size; };
|
28 : |
|
|
int getTagID(const char* tagname);
|
29 : |
|
|
const char* getTagName(int id) const { return tagID[id]; };
|
30 : |
|
|
void Migrate(const DoubleMatrix& MI, const AgeBandMatrixPtrVector& Total);
|
31 : |
|
|
int numTagExperiments() const { return tagID.Size(); };
|
32 : |
|
|
const DoubleVector& getTagLoss() const { return tagLoss; };
|
33 : |
|
|
AgeBandMatrixRatio& operator [] (int pos) { return *v[pos]; };
|
34 : |
|
|
const AgeBandMatrixRatio& operator [] (int pos) const { return *v[pos]; };
|
35 : |
|
|
void Add(const AgeBandMatrixRatioPtrVector& Addition, int area,
|
36 : |
|
|
const ConversionIndex &CI, double ratio = 1.0);
|
37 : |
|
|
protected:
|
38 : |
|
|
void addTagName(const char* name);
|
39 : |
|
|
int size;
|
40 : |
|
|
AgeBandMatrixRatio** v;
|
41 : |
|
|
CharPtrVector tagID;
|
42 : |
|
|
DoubleVector tagLoss;
|
43 : |
|
|
};
|
44 : |
|
|
|
45 : |
|
|
#endif
|