Log In | Get Help   
Home My Page Projects Code Snippets Project Openings Mareframe
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files
[mareframe] Annotation of /trunk/gadget/predatoraggregator.h
[mareframe] / trunk / gadget / predatoraggregator.h Repository:
ViewVC logotype

Annotation of /trunk/gadget/predatoraggregator.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #ifndef predatoraggregator_h
2 :     #define predatoraggregator_h
3 :    
4 :     #include "agebandmatrix.h"
5 :     #include "doublematrixptrvector.h"
6 :     #include "intmatrix.h"
7 :     #include "predatorptrvector.h"
8 :     #include "preyptrvector.h"
9 :     #include "charptrvector.h"
10 :    
11 :     /**
12 :     * \class PredatorAggregator
13 :     * \brief This is the class used to aggregate predation information
14 :     */
15 :     class PredatorAggregator {
16 :     public:
17 :     /**
18 :     * \brief This is the PredatorAggregator constructor for length based predators
19 :     * \param predators is the PredatorPtrVector of the predators that will be aggregated
20 :     * \param preys is the PreyPtrVector of the preys that will be aggregated
21 :     * \param Areas is the IntMatrix of areas that the predation can take place on
22 :     * \param predLgrpDiv is the LengthGroupDivision of the predators
23 :     * \param preyLgrpDiv is the LengthGroupDivision of the preys
24 :     */
25 :     PredatorAggregator(const PredatorPtrVector& predators, const PreyPtrVector& preys,
26 :     const IntMatrix& Areas, const LengthGroupDivision* const predLgrpDiv,
27 :     const LengthGroupDivision* const preyLgrpDiv);
28 :     /**
29 :     * \brief This is the PredatorAggregator constructor for age based predators
30 :     * \param predators is the PredatorPtrVector of the predators that will be aggregated
31 :     * \param preys is the PreyPtrVector of the preys that will be aggregated
32 :     * \param Areas is the IntMatrix of areas that the predation can take place on
33 :     * \param predAges is the IntMatrix of the predator ages
34 :     * \param preyLgrpDiv is the LengthGroupDivision of the preys
35 :     */
36 :     PredatorAggregator(const PredatorPtrVector& predators, const PreyPtrVector& preys,
37 :     const IntMatrix& Areas, const IntMatrix& predAges,
38 :     const LengthGroupDivision* const preyLgrpDiv);
39 :     /**
40 :     * \brief This is the default PredatorAggregator destructor
41 :     */
42 :     ~PredatorAggregator();
43 :     /**
44 :     * \brief This will print the aggregator information to the ofstream specified
45 :     * \param outfile is the ofstream to the file that the aggregator information gets sent to
46 :     */
47 :     void Print(ofstream &outfile) const;
48 :     /**
49 :     * \brief This function will reset the predation data
50 :     */
51 :     void Reset();
52 :     /**
53 :     * \brief This function will aggregate the predation biomass data
54 :     */
55 :     void Sum();
56 :     /**
57 :     * \brief This function will aggregate the predation number data
58 :     */
59 :     void NumberSum();
60 :     /**
61 :     * \brief This will return the DoubleMatrixPtrVector containing the aggregated predation information
62 :     * \return total, the DoubleMatrixPtrVector of aggregated predation information
63 :     */
64 :     const DoubleMatrixPtrVector& getSum() const { return total; };
65 :     protected:
66 :     /**
67 :     * \brief This is the PredatorPtrVector of the predators that will be aggregated
68 :     */
69 :     PredatorPtrVector predators;
70 :     /**
71 :     * \brief This is the PreyPtrVector of the preys that will be aggregated
72 :     */
73 :     PreyPtrVector preys;
74 :     /**
75 :     * \brief This is the IntMatrix used to convert length group information for predators
76 :     * \note predConv[i][j] is the index of the length group in DoubleMatrixPtrVector total to which length group j of predator i belongs.
77 :     */
78 :     IntMatrix predConv;
79 :     /**
80 :     * \brief This is the IntMatrix used to convert length group information for preys
81 :     * \note preyConv[i][j] is the index of the length group in DoubleMatrixPtrVector total to which length group j of prey i belongs.
82 :     */
83 :     IntMatrix preyConv;
84 :     /**
85 :     * \brief This is the IntMatrix used to store area information
86 :     */
87 :     IntMatrix areas;
88 :     /**
89 :     * \brief This is the IntMatrix used to store predation information
90 :     * \note doeseat[i][j] is the flag to denote whether predator i eats prey j
91 :     */
92 :     IntMatrix doeseat;
93 :     /**
94 :     * \brief This is the DoubleMatrixPtrVector used to store the aggregated predation information
95 :     */
96 :     DoubleMatrixPtrVector total;
97 :     /**
98 :     * \brief This is the DoubleMatrix used to temporarily store information when aggregating the predation
99 :     */
100 :     const DoubleMatrix* dptr;
101 :     /**
102 :     * \brief This is the AgeBandMatrix used to temporarily store information when aggregating the predation
103 :     */
104 :     const AgeBandMatrix* alk;
105 :     /**
106 :     * \brief This is the flag used to denote whether the predators are specified using age groups or length groups
107 :     */
108 :     int usepredages;
109 :     };
110 :    
111 :     #endif

root@forge.cesga.es
ViewVC Help
Powered by ViewVC 1.0.0  

Powered By FusionForge