Gadget
understocking.h
Go to the documentation of this file.
1 #ifndef understocking_h
2 #define understocking_h
3 
4 #include "likelihood.h"
5 #include "areatime.h"
6 #include "commentstream.h"
7 #include "intmatrix.h"
8 #include "doublematrix.h"
9 #include "predatorptrvector.h"
10 #include "preyptrvector.h"
11 
18 class UnderStocking : public Likelihood {
19 public:
28  UnderStocking(CommentStream& infile, const AreaClass* const Area,
29  const TimeClass* const TimeInfo, double weight, const char* name);
33  virtual ~UnderStocking();
38  virtual void addLikelihood(const TimeClass* const TimeInfo);
43  virtual void Reset(const Keeper* const keeper);
48  virtual void printSummary(ofstream& outfile);
53  virtual void Print(ofstream& outfile) const;
60  void setPredatorsAndPreys(PredatorPtrVector& predvec, PreyPtrVector& preyvec, const AreaClass* const Area);
61 private:
65  PredatorPtrVector predators;
69  PreyPtrVector preys;
73  IntVector areas;
77  double powercoeff;
81  int allpredators;
85  IntVector Years;
89  IntVector Steps;
93  DoubleVector likelihoodValues;
97  CharPtrVector prednames;
98 };
99 
100 #endif
This is the class used to store information about the areas used for the current model.
Definition: areatime.h:18
This class implements a dynamic vector of char values.
Definition: charptrvector.h:8
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 double values.
Definition: doublevector.h:11
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
This is the base class used to calculate the likelihood scores used to compare the modelled data in t...
Definition: likelihood.h:24
double weight
This stores the weight to be applied to the likelihood component.
Definition: likelihood.h:112
This class implements a dynamic vector of Predator values.
Definition: predatorptrvector.h:10
This class implements a dynamic vector of Prey values.
Definition: preyptrvector.h:10
This is the class used to store information about the timesteps used for the current model.
Definition: areatime.h:87
This is the class used to calculate a likelihood score based on the overconsumption of a stock by pre...
Definition: understocking.h:18
virtual void addLikelihood(const TimeClass *const TimeInfo)
This function will calculate the likelihood score for the UnderStocking component.
Definition: understocking.cc:119
virtual void printSummary(ofstream &outfile)
This function will print summary information from each non-zero UnderStocking likelihood calculation.
Definition: understocking.cc:175
void setPredatorsAndPreys(PredatorPtrVector &predvec, PreyPtrVector &preyvec, const AreaClass *const Area)
This will select the predators and preys required to calculate the UnderStocking likelihood score.
Definition: understocking.cc:72
UnderStocking(CommentStream &infile, const AreaClass *const Area, const TimeClass *const TimeInfo, double weight, const char *name)
This is the UnderStocking constructor.
Definition: understocking.cc:10
virtual ~UnderStocking()
This is the default UnderStocking destructor.
Definition: understocking.cc:66
virtual void Reset(const Keeper *const keeper)
This function will reset the UnderStocking likelihood information.
Definition: understocking.cc:108
virtual void Print(ofstream &outfile) const
This function will print the non-zero UnderStocking likelihood information.
Definition: understocking.cc:158