1 : |
agomez |
1 |
#ifndef recaggregator_h
|
2 : |
|
|
#define recaggregator_h
|
3 : |
|
|
|
4 : |
|
|
#include "areatime.h" |
5 : |
|
|
#include "agebandmatrixptrvector.h" |
6 : |
|
|
#include "conversionindexptrvector.h" |
7 : |
|
|
#include "fleetptrvector.h" |
8 : |
|
|
#include "stockptrvector.h" |
9 : |
|
|
#include "predatorptrvector.h" |
10 : |
|
|
#include "preyptrvector.h" |
11 : |
|
|
#include "intmatrix.h" |
12 : |
|
|
#include "tags.h" |
13 : |
|
|
|
14 : |
|
|
/**
|
15 : |
|
|
* \class RecAggregator
|
16 : |
|
|
* \brief This is the class used to aggregate the recaptured tagged stock information
|
17 : |
|
|
*/
|
18 : |
|
|
class RecAggregator {
|
19 : |
|
|
public:
|
20 : |
|
|
/**
|
21 : |
|
|
* \brief This is the RecAggregator constructor
|
22 : |
|
|
* \param Stocks is the StockPtrVector of the stocks that will be recaptured
|
23 : |
|
|
* \param Fleets is the FleetPtrVector of the fleets that will be recapturing the tagged fish
|
24 : |
|
|
* \param Lgrpdiv is the LengthGroupDivision of the recaptured fish
|
25 : |
|
|
* \param Areas is the IntMatrix of areas that the recaptures can take place on
|
26 : |
|
|
* \param Ages is the IntMatrix of ages of the recaptures
|
27 : |
|
|
* \param tag is the Tags of the tagging experiments
|
28 : |
|
|
*/
|
29 : |
|
|
RecAggregator(const FleetPtrVector& Fleets, const StockPtrVector& Stocks,
|
30 : |
|
|
LengthGroupDivision* const Lgrpdiv, const IntMatrix& Areas,
|
31 : |
|
|
const IntMatrix& Ages, Tags* tag);
|
32 : |
|
|
/**
|
33 : |
|
|
* \brief This is the default RecAggregator destructor
|
34 : |
|
|
*/
|
35 : |
|
|
~RecAggregator();
|
36 : |
|
|
/**
|
37 : |
|
|
* \brief This function will return the LengthGroupDivision of the aggregator
|
38 : |
|
|
* \return LgrpDiv, the LengthGroupDivision of the aggregator
|
39 : |
|
|
*/
|
40 : |
|
|
LengthGroupDivision* getLengthGroupDiv() const { return LgrpDiv; };
|
41 : |
|
|
/**
|
42 : |
|
|
* \brief This function will reset the recapture data
|
43 : |
|
|
*/
|
44 : |
|
|
void Reset();
|
45 : |
|
|
/**
|
46 : |
|
|
* \brief This function will aggregate the recapture data
|
47 : |
|
|
*/
|
48 : |
|
|
void Sum();
|
49 : |
|
|
/**
|
50 : |
|
|
* \brief This will print the aggregator information to the ofstream specified
|
51 : |
|
|
* \param outfile is the ofstream to the file that the aggregator information gets sent to
|
52 : |
|
|
*/
|
53 : |
|
|
void Print(ofstream &outfile) const;
|
54 : |
|
|
/**
|
55 : |
|
|
* \brief This will return the AgeBandMatrixPtrVector containing the aggregated recaptures information
|
56 : |
|
|
* \return total, the AgeBandMatrixPtrVector of aggregated recaptures information
|
57 : |
|
|
*/
|
58 : |
|
|
const AgeBandMatrixPtrVector& getSum() const { return total; };
|
59 : |
|
|
private:
|
60 : |
|
|
/**
|
61 : |
|
|
* \brief This is the PredatorPtrVector of the fleets that will be aggregated
|
62 : |
|
|
*/
|
63 : |
|
|
PredatorPtrVector predators;
|
64 : |
|
|
/**
|
65 : |
|
|
* \brief This is the PreyPtrVector of the stocks that will be aggregated
|
66 : |
|
|
*/
|
67 : |
|
|
PreyPtrVector preys;
|
68 : |
|
|
/**
|
69 : |
|
|
* \brief This is the Tags containing details of the tagging experiment that will be aggregated
|
70 : |
|
|
*/
|
71 : |
|
|
Tags* taggingExp;
|
72 : |
|
|
/**
|
73 : |
|
|
* \brief This is the LengthGroupDivision of the aggregated stocks
|
74 : |
|
|
*/
|
75 : |
|
|
LengthGroupDivision* LgrpDiv;
|
76 : |
|
|
/**
|
77 : |
|
|
* \brief This is the IntMatrix used to store area information
|
78 : |
|
|
*/
|
79 : |
|
|
IntMatrix areas;
|
80 : |
|
|
/**
|
81 : |
|
|
* \brief This is the IntMatrix used to store age information
|
82 : |
|
|
*/
|
83 : |
|
|
IntMatrix ages;
|
84 : |
|
|
/**
|
85 : |
|
|
* \brief This is the IntMatrix used to store predation information
|
86 : |
|
|
* \note doescatch[i][j] is the flag to denote whether fleet i catches stock j
|
87 : |
|
|
*/
|
88 : |
|
|
IntMatrix doescatch;
|
89 : |
|
|
/**
|
90 : |
|
|
* \brief This is the ConversionIndexPtrVector used to convert the length groups of the stocks to be aggregated
|
91 : |
|
|
*/
|
92 : |
|
|
ConversionIndexPtrVector CI;
|
93 : |
|
|
/**
|
94 : |
|
|
* \brief This is the AgeBandMatrixPtrVector used to store the aggregated recaptures
|
95 : |
|
|
*/
|
96 : |
|
|
AgeBandMatrixPtrVector total;
|
97 : |
|
|
/**
|
98 : |
|
|
* \brief This is the DoubleVector used to temporarily store suitability information when aggregating the catch
|
99 : |
|
|
*/
|
100 : |
|
|
const DoubleVector* suitptr;
|
101 : |
|
|
/**
|
102 : |
|
|
* \brief This is the AgeBandMatrix used to temporarily store information when aggregating the catch
|
103 : |
|
|
*/
|
104 : |
|
|
const AgeBandMatrix* alptr;
|
105 : |
|
|
};
|
106 : |
|
|
|
107 : |
|
|
#endif
|