Gadget
recstatistics.h
Go to the documentation of this file.
1 #ifndef recstatistics_h
2 #define recstatistics_h
3 
4 #include "likelihood.h"
5 #include "commentstream.h"
6 #include "recaggregator.h"
8 #include "tagptrvector.h"
9 #include "popstatistics.h"
10 
17 class RecStatistics : public Likelihood {
18 public:
28  RecStatistics(CommentStream& infile, const AreaClass* const Area,
29  const TimeClass* const TimeInfo, double weight, TagPtrVector Tag, const char* name);
33  virtual ~RecStatistics();
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);
59  virtual void printSummary(ofstream& outfile);
65  virtual void printLikelihood(ofstream& outfile, const TimeClass* const TimeInfo);
66 private:
74  void readStatisticsData(CommentStream& infile, const TimeClass* TimeInfo,
75  int numarea, TagPtrVector Tag);
80  double calcLikSumSquares();
85  DoubleMatrixPtrVector numbers;
90  DoubleMatrixPtrVector obsMean;
95  DoubleMatrixPtrVector modelMean;
100  DoubleMatrixPtrVector obsStdDev;
105  DoubleMatrixPtrVector modelStdDev;
109  RecAggregator** aggregator;
113  LengthGroupDivision* LgrpDiv;
117  CharPtrVector fleetnames;
121  CharPtrVector tagnames;
125  IntMatrix areas;
129  CharPtrVector areaindex;
133  int functionnumber;
137  IntVector timeindex;
141  IntMatrix Years;
145  IntMatrix Steps;
149  char* functionname;
153  TagPtrVector tagvec;
157  PopStatistics ps;
161  const AgeBandMatrixPtrVector* alptr;
162 };
163 
164 #endif
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 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 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 is the class used to aggregate the recaptured tagged stock information.
Definition: recaggregator.h:18
This is the class used to calculate a likelihood score based on statistical data sampled from the tag...
Definition: recstatistics.h:17
RecStatistics(CommentStream &infile, const AreaClass *const Area, const TimeClass *const TimeInfo, double weight, TagPtrVector Tag, const char *name)
This is the RecStatistics constructor.
Definition: recstatistics.cc:15
void setFleetsAndStocks(FleetPtrVector &Fleets, StockPtrVector &Stocks)
This will select the fleets and stocks required to calculate the RecStatistics likelihood score.
Definition: recstatistics.cc:284
virtual void addLikelihood(const TimeClass *const TimeInfo)
This function will calculate the likelihood score for the RecStatistics component.
Definition: recstatistics.cc:351
virtual void Print(ofstream &outfile) const
This function will print the summary RecStatistics likelihood information.
Definition: recstatistics.cc:255
virtual void printLikelihood(ofstream &outfile, const TimeClass *const TimeInfo)
This function will print information from each Recaptures calculation.
Definition: recstatistics.cc:419
virtual void Reset(const Keeper *const keeper)
This function will reset the RecStatistics likelihood information.
Definition: recstatistics.cc:244
virtual ~RecStatistics()
This is the default RecStatistics destructor.
Definition: recstatistics.cc:217
virtual void printSummary(ofstream &outfile)
This function will print summary information from the RecStatistics likelihood calculation.
Definition: recstatistics.cc:272
This class implements a dynamic vector of Stock values.
Definition: stockptrvector.h:10
This class implements a dynamic vector of Tags values.
Definition: tagptrvector.h:12
This is the class used to store information about the timesteps used for the current model.
Definition: areatime.h:87