1 : |
agomez |
1 |
#ifndef fleeteffortaggregator_h
|
2 : |
|
|
#define fleeteffortaggregator_h
|
3 : |
|
|
|
4 : |
|
|
#include "areatime.h" |
5 : |
|
|
#include "doublematrixptrvector.h" |
6 : |
|
|
#include "fleetptrvector.h" |
7 : |
|
|
#include "stockptrvector.h" |
8 : |
|
|
#include "predatorptrvector.h" |
9 : |
|
|
#include "preyptrvector.h" |
10 : |
|
|
#include "intmatrix.h" |
11 : |
|
|
|
12 : |
|
|
/**
|
13 : |
|
|
* \class FleetEffortAggregator
|
14 : |
|
|
* \brief This is the class used to aggregate fleet catch information
|
15 : |
|
|
*/
|
16 : |
|
|
class FleetEffortAggregator {
|
17 : |
|
|
public:
|
18 : |
|
|
/**
|
19 : |
|
|
* \brief This is the FleetEffortAggregator constructor
|
20 : |
|
|
* \param Fleets is the FleetPtrVector of the fleets that will be aggregated
|
21 : |
|
|
* \param Stocks is the StockPtrVector of the stocks that will be aggregated
|
22 : |
|
|
* \param Areas is the IntMatrix of areas that the catch can take place on
|
23 : |
|
|
*/
|
24 : |
|
|
FleetEffortAggregator(const FleetPtrVector& Fleets, const StockPtrVector& Stocks, const IntMatrix& Areas);
|
25 : |
|
|
/**
|
26 : |
|
|
* \brief This is the default FleetEffortAggregator destructor
|
27 : |
|
|
*/
|
28 : |
|
|
~FleetEffortAggregator();
|
29 : |
|
|
/**
|
30 : |
|
|
* \brief This function will reset the fleet catch information
|
31 : |
|
|
*/
|
32 : |
|
|
void Reset();
|
33 : |
|
|
/**
|
34 : |
|
|
* \brief This function will aggregate the fleet catch data
|
35 : |
|
|
*/
|
36 : |
|
|
void Sum();
|
37 : |
|
|
/**
|
38 : |
|
|
* \brief This will print the aggregator information to the ofstream specified
|
39 : |
|
|
* \param outfile is the ofstream to the file that the aggregator information gets sent to
|
40 : |
|
|
*/
|
41 : |
|
|
void Print(ofstream &outfile) const;
|
42 : |
|
|
/**
|
43 : |
|
|
* \brief This will return the DoubleMatrixPtrVector containing the aggregated catch information
|
44 : |
|
|
* \return total, the DoubleMatrixPtrVector of aggregated catch information
|
45 : |
|
|
*/
|
46 : |
|
|
const DoubleMatrixPtrVector& getSum() const { return total; };
|
47 : |
|
|
private:
|
48 : |
|
|
/**
|
49 : |
|
|
* \brief This is the PredatorPtrVector of the fleets that will be aggregated
|
50 : |
|
|
*/
|
51 : |
|
|
PredatorPtrVector predators;
|
52 : |
|
|
/**
|
53 : |
|
|
* \brief This is the PreyPtrVector of the stocks that will be aggregated
|
54 : |
|
|
*/
|
55 : |
|
|
PreyPtrVector preys;
|
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 predation information
|
62 : |
|
|
* \note doescatch[i][j] is the flag to denote whether fleet i catches stock j
|
63 : |
|
|
*/
|
64 : |
|
|
IntMatrix doescatch;
|
65 : |
|
|
/**
|
66 : |
|
|
* \brief This is the DoubleMatrixPtrVector used to store the aggregated catch
|
67 : |
|
|
*/
|
68 : |
|
|
DoubleMatrixPtrVector total;
|
69 : |
|
|
};
|
70 : |
|
|
|
71 : |
|
|
#endif
|