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/stockprey.h
[mareframe] / trunk / gadget / stockprey.h Repository:
ViewVC logotype

Annotation of /trunk/gadget/stockprey.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (view) (download)

1 : agomez 1 #ifndef stockprey_h
2 :     #define stockprey_h
3 :    
4 :     #include "prey.h"
5 :     #include "agebandmatrixptrvector.h"
6 :    
7 :     /**
8 :     * \class StockPrey
9 :     * \brief This is the class used to model a dynamic prey based on a modelled stock
10 :     */
11 :     class StockPrey : public Prey {
12 :     public:
13 :     /**
14 :     * \brief This is the StockPrey constructor
15 :     * \param infile is the CommentStream to read the prey parameters from
16 :     * \param Areas is the IntVector of areas that the prey lives on
17 :     * \param givenname is the name of the prey
18 :     * \param minage is the minimum age of the prey
19 :     * \param numage is the number of age groups for the prey
20 :     * \param TimeInfo is the TimeClass for the current model
21 :     * \param keeper is the Keeper for the current model
22 :     */
23 :     StockPrey(CommentStream& infile, const IntVector& Areas,
24 :     const char* givenname, int minage, int numage,
25 :     const TimeClass* const TimeInfo, Keeper* const keeper);
26 :     /**
27 :     * \brief This is the default StockPrey destructor
28 :     */
29 :     virtual ~StockPrey() {};
30 :     /**
31 :     * \brief This will calculate the amount of prey that is consumed for a given area and timestep
32 :     * \param stockAlkeys is the AgeBandMatrix giving the amount of prey in the area
33 :     * \param area is the area that the prey consumption is being calculated on
34 :     */
35 :     virtual void Sum(const AgeBandMatrix& stockAlkeys, int area);
36 :     /**
37 :     * \brief This function will print the prey information
38 :     * \param outfile is the ofstream that all the model information gets sent to
39 :     */
40 :     virtual void Print(ofstream& outfile) const;
41 :     /**
42 :     * \brief This will return the minimum age of the prey
43 :     * \return minimum age
44 :     */
45 :     int minAge() const { return preyAlkeys[0].minAge(); };
46 :     /**
47 :     * \brief This will return the maximum age of the prey
48 :     * \return maximum age
49 :     */
50 :     int maxAge() const { return preyAlkeys[0].maxAge(); };
51 :     /**
52 :     * \brief This function will return the amount of prey on the area before consumption
53 :     * \param area is the area that the prey consumption is being calculated on
54 :     * \return preyAlkeys, the population of the prey for the area before consumption
55 :     */
56 :     AgeBandMatrix& getConsumptionALK(int area) { return preyAlkeys[this->areaNum(area)]; };
57 :     protected:
58 :     /**
59 :     * \brief This is the AgeBandMatrixPtrVector used to store the amount of the prey on each area
60 :     */
61 :     AgeBandMatrixPtrVector preyAlkeys;
62 :     };
63 :    
64 :     #endif

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

Powered By FusionForge