1 : |
agomez |
1 |
#ifndef stockpreyaggregator_h
|
2 : |
|
|
#define stockpreyaggregator_h
|
3 : |
|
|
|
4 : |
|
|
#include "agebandmatrix.h" |
5 : |
|
|
#include "agebandmatrixptrvector.h" |
6 : |
|
|
#include "preyptrvector.h" |
7 : |
|
|
#include "conversionindexptrvector.h" |
8 : |
|
|
#include "intmatrix.h" |
9 : |
|
|
|
10 : |
|
|
/**
|
11 : |
|
|
* \class StockPreyAggregator
|
12 : |
|
|
* \brief This is the class used to aggregate stock prey information
|
13 : |
|
|
*/
|
14 : |
|
|
class StockPreyAggregator {
|
15 : |
|
|
public:
|
16 : |
|
|
/**
|
17 : |
|
|
* \brief This is the StockPreyAggregator constructor
|
18 : |
|
|
* \param Preys is the PreyPtrVector of the preys that will be aggregated
|
19 : |
|
|
* \param LgrpDiv is the LengthGroupDivision that the preys will be aggregated to
|
20 : |
|
|
* \param Areas is the IntMatrix of areas that the preys to be aggregated live on
|
21 : |
|
|
* \param Ages is the IntMatrix of ages of the preys to be aggregated
|
22 : |
|
|
*/
|
23 : |
|
|
StockPreyAggregator(const PreyPtrVector& Preys, const LengthGroupDivision* const LgrpDiv,
|
24 : |
|
|
const IntMatrix& Areas, const IntMatrix& Ages);
|
25 : |
|
|
/**
|
26 : |
|
|
* \brief This is the default StockPreyAggregator destructor
|
27 : |
|
|
*/
|
28 : |
|
|
~StockPreyAggregator();
|
29 : |
|
|
/**
|
30 : |
|
|
* \brief This function will reset the stock prey data
|
31 : |
|
|
*/
|
32 : |
|
|
void Reset();
|
33 : |
|
|
/**
|
34 : |
|
|
* \brief This function will aggregate the stock prey data
|
35 : |
|
|
*/
|
36 : |
|
|
void Sum();
|
37 : |
|
|
/**
|
38 : |
|
|
* \brief This will return the AgeBandMatrixPtrVector containing the aggregated stock prey information
|
39 : |
|
|
* \return total, the AgeBandMatrixPtrVector of aggregated stock information
|
40 : |
|
|
*/
|
41 : |
|
|
const AgeBandMatrixPtrVector& getSum() const { return total; };
|
42 : |
|
|
/**
|
43 : |
|
|
* \brief This will print the aggregator information to the ofstream specified
|
44 : |
|
|
* \param outfile is the ofstream to the file that the aggregator information gets sent to
|
45 : |
|
|
*/
|
46 : |
|
|
void Print(ofstream &outfile) const;
|
47 : |
|
|
protected:
|
48 : |
|
|
/**
|
49 : |
|
|
* \brief This is the PreyPtrVector of the preys that will be aggregated
|
50 : |
|
|
*/
|
51 : |
|
|
PreyPtrVector preys;
|
52 : |
|
|
/**
|
53 : |
|
|
* \brief This is the ConversionIndexPtrVector used to convert the length groups of the preys to be aggregated
|
54 : |
|
|
*/
|
55 : |
|
|
ConversionIndexPtrVector CI;
|
56 : |
|
|
/**
|
57 : |
|
|
* \brief This is the IntMatrix used to store area information
|
58 : |
|
|
*/
|
59 : |
|
|
IntMatrix areas;
|
60 : |
|
|
/**
|
61 : |
|
|
* \brief This is the IntMatrix used to store age information
|
62 : |
|
|
*/
|
63 : |
|
|
IntMatrix ages;
|
64 : |
|
|
/**
|
65 : |
|
|
* \brief This is the AgeBandMatrixPtrVector used to store the aggregated stock prey information
|
66 : |
|
|
*/
|
67 : |
|
|
AgeBandMatrixPtrVector total;
|
68 : |
|
|
/**
|
69 : |
|
|
* \brief This is the AgeBandMatrix used to temporarily store information when aggregating the preys
|
70 : |
|
|
*/
|
71 : |
|
|
const AgeBandMatrix* alptr;
|
72 : |
|
|
};
|
73 : |
|
|
|
74 : |
|
|
#endif
|