Gadget
stockprey.h
Go to the documentation of this file.
1 #ifndef stockprey_h
2 #define stockprey_h
3 
4 #include "prey.h"
6 
11 class StockPrey : public Prey {
12 public:
23  StockPrey(CommentStream& infile, const IntVector& Areas,
24  const char* givenname, int minage, int numage,
25  const TimeClass* const TimeInfo, Keeper* const keeper);
29  virtual ~StockPrey() {};
35  virtual void Sum(const AgeBandMatrix& stockAlkeys, int area);
40  virtual void Print(ofstream& outfile) const;
45  int minAge() const { return preyAlkeys[0].minAge(); };
50  int maxAge() const { return preyAlkeys[0].maxAge(); };
56  AgeBandMatrix& getConsumptionALK(int area) { return preyAlkeys[this->areaNum(area)]; };
57 protected:
62 };
63 
64 #endif
This class implements a dynamic vector of AgeBandMatrix values.
Definition: agebandmatrixptrvector.h:12
This class implements a vector of PopInfoIndexVector values, indexed from minage not 0.
Definition: agebandmatrix.h:15
This is the class used to strip comments (and whitespace) from any input stream.
Definition: commentstream.h:40
This class implements a dynamic vector of int values.
Definition: intvector.h:11
This is the class used to store information about the variables that are used in model simulation.
Definition: keeper.h:17
int areaNum(int area) const
This function will return the area associated with an internal area.
Definition: livesonareas.cc:33
This is the base class used to model the consumption of a prey.
Definition: prey.h:27
This is the class used to model a dynamic prey based on a modelled stock.
Definition: stockprey.h:11
int maxAge() const
This will return the maximum age of the prey.
Definition: stockprey.h:50
AgeBandMatrixPtrVector preyAlkeys
This is the AgeBandMatrixPtrVector used to store the amount of the prey on each area.
Definition: stockprey.h:56
AgeBandMatrix & getConsumptionALK(int area)
This function will return the amount of prey on the area before consumption.
Definition: stockprey.h:56
virtual void Print(ofstream &outfile) const
This function will print the prey information.
Definition: stockprey.cc:30
StockPrey(CommentStream &infile, const IntVector &Areas, const char *givenname, int minage, int numage, const TimeClass *const TimeInfo, Keeper *const keeper)
This is the StockPrey constructor.
Definition: stockprey.cc:3
virtual void Sum(const AgeBandMatrix &stockAlkeys, int area)
This will calculate the amount of prey that is consumed for a given area and timestep.
Definition: stockprey.cc:17
virtual ~StockPrey()
This is the default StockPrey destructor.
Definition: stockprey.h:29
int minAge() const
This will return the minimum age of the prey.
Definition: stockprey.h:45
This is the class used to store information about the timesteps used for the current model.
Definition: areatime.h:87