Gadget
catchstatistics.h
Go to the documentation of this file.
1 #ifndef catchstatistics_h
2 #define catchstatistics_h
3 
4 #include "likelihood.h"
5 #include "commentstream.h"
6 #include "charptrvector.h"
7 #include "fleetpreyaggregator.h"
9 #include "popstatistics.h"
10 #include "actionattimes.h"
11 
18 class CatchStatistics : public Likelihood {
19 public:
28  CatchStatistics(CommentStream& infile, const AreaClass* const Area,
29  const TimeClass* const TimeInfo, double weight, const char* name);
33  virtual ~CatchStatistics();
38  virtual void addLikelihood(const TimeClass* const TimeInfo);
43  virtual void Reset(const Keeper* const keeper);
48  virtual void Print(ofstream& outfile) const;
54  void setFleetsAndStocks(FleetPtrVector& Fleets, StockPtrVector& Stocks);
60  virtual void printLikelihood(ofstream& outfile, const TimeClass* const TimeInfo);
65  virtual void printSummary(ofstream& outfile);
66 private:
75  void readStatisticsData(CommentStream& infile, const TimeClass* TimeInfo,
76  int numarea, int numage, int numlen);
81  double calcLikSumSquares();
86  DoubleMatrixPtrVector numbers;
91  DoubleMatrixPtrVector obsMean;
96  DoubleMatrixPtrVector modelMean;
101  DoubleMatrixPtrVector obsStdDev;
106  DoubleMatrixPtrVector modelStdDev;
111  DoubleMatrix likelihoodValues;
115  FleetPreyAggregator* aggregator;
119  LengthGroupDivision* LgrpDiv;
123  CharPtrVector fleetnames;
127  CharPtrVector stocknames;
131  IntMatrix areas;
135  IntMatrix ages;
139  IntMatrix lengths;
143  CharPtrVector areaindex;
147  CharPtrVector ageindex;
151  CharPtrVector lenindex;
155  int overconsumption;
159  int timeindex;
163  int functionnumber;
167  ActionAtTimes AAT;
171  IntVector Years;
175  IntVector Steps;
179  char* functionname;
183  PopStatistics ps;
188  const AgeBandMatrixPtrVector* alptr;
189 };
190 
191 #endif
This is the class used to associate actions with specific timesteps within the model.
Definition: actionattimes.h:14
This class implements a dynamic vector of AgeBandMatrix values.
Definition: agebandmatrixptrvector.h:12
This is the class used to store information about the areas used for the current model.
Definition: areatime.h:18
This is the class used to calculate a likelihood score based on statistical data sampled from the sto...
Definition: catchstatistics.h:18
virtual void Print(ofstream &outfile) const
This function will print the summary CatchStatistics likelihood information.
Definition: catchstatistics.cc:378
virtual void Reset(const Keeper *const keeper)
This function will reset the CatchStatistics likelihood information.
Definition: catchstatistics.cc:367
CatchStatistics(CommentStream &infile, const AreaClass *const Area, const TimeClass *const TimeInfo, double weight, const char *name)
This is the CatchStatistics constructor.
Definition: catchstatistics.cc:14
virtual void printSummary(ofstream &outfile)
This function will print summary information from each CatchStatistics likelihood calculation.
Definition: catchstatistics.cc:707
virtual void printLikelihood(ofstream &outfile, const TimeClass *const TimeInfo)
This function will print information from each CatchStatistics calculation.
Definition: catchstatistics.cc:625
virtual void addLikelihood(const TimeClass *const TimeInfo)
This function will calculate the likelihood score for the CatchStatistics component.
Definition: catchstatistics.cc:507
virtual ~CatchStatistics()
This is the default CatchStatistics destructor.
Definition: catchstatistics.cc:340
void setFleetsAndStocks(FleetPtrVector &Fleets, StockPtrVector &Stocks)
This will select the fleets and stocks required to calculate the CatchStatistics likelihood score.
Definition: catchstatistics.cc:393
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 DoubleMatrix values.
Definition: doublematrixptrvector.h:10
This class implements a dynamic vector of DoubleVector values.
Definition: doublematrix.h:11
This is the class used to aggregate fleet catch information.
Definition: fleetpreyaggregator.h:18
This class implements a dynamic vector of Fleet values.
Definition: fleetptrvector.h:10
This class implements a dynamic vector of IntVector values.
Definition: intmatrix.h:10
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 class used to store information about the length groups of the modelled stock population.
Definition: lengthgroup.h:10
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 is the class used to calculate some standard statistics about a given population.
Definition: popstatistics.h:13
This class implements a dynamic vector of Stock values.
Definition: stockptrvector.h:10
This is the class used to store information about the timesteps used for the current model.
Definition: areatime.h:87