Gadget
recapture.h
Go to the documentation of this file.
1 #ifndef recapture_h
2 #define recapture_h
3 
4 #include "likelihood.h"
5 #include "commentstream.h"
6 #include "recaggregator.h"
8 #include "tagptrvector.h"
9 
16 class Recaptures : public Likelihood {
17 public:
27  Recaptures(CommentStream& infile, const AreaClass* const Area,
28  const TimeClass* const TimeInfo, double weight, TagPtrVector Tag, const char* name);
32  virtual ~Recaptures();
37  virtual void addLikelihood(const TimeClass* const TimeInfo);
42  virtual void Reset(const Keeper* const keeper);
47  virtual void Print(ofstream& outfile) const;
53  virtual void setFleetsAndStocks(FleetPtrVector& Fleets, StockPtrVector& Stocks);
58  virtual void printSummary(ofstream& outfile);
64  virtual void printLikelihood(ofstream& outfile, const TimeClass* const TimeInfo);
65 private:
73  void readRecaptureData(CommentStream& infile,
74  const TimeClass* const TimeInfo, int numarea, int numlen);
80  double calcLikPoisson(const TimeClass* const TimeInfo);
84  RecAggregator** aggregator;
88  CharPtrVector tagnames;
92  CharPtrVector fleetnames;
96  CharPtrVector areaindex;
100  CharPtrVector lenindex;
104  IntMatrix areas;
108  DoubleVector lengths;
112  IntMatrix obsYears;
116  IntMatrix obsSteps;
120  IntMatrix modYears;
124  IntMatrix modSteps;
129  DoubleMatrixPtrMatrix obsDistribution;
134  DoubleMatrixPtrMatrix modelDistribution;
139  DoubleMatrixPtrMatrix newDistribution;
143  TagPtrVector tagvec;
147  int functionnumber;
151  char* functionname;
155  const AgeBandMatrixPtrVector* alptr;
156 };
157 
158 #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 DoubleMatrixPtrVector values.
Definition: doublematrixptrmatrix.h:13
This class implements a dynamic vector of double values.
Definition: doublevector.h:11
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 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 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 returns data from tagging experiments...
Definition: recapture.h:16
virtual void printSummary(ofstream &outfile)
This function will print summary information from the Recaptures likelihood calculation.
Definition: recapture.cc:434
virtual ~Recaptures()
This is the default Recaptures destructor.
Definition: recapture.cc:206
virtual void printLikelihood(ofstream &outfile, const TimeClass *const TimeInfo)
This function will print information from each Recaptures calculation.
Definition: recapture.cc:446
virtual void setFleetsAndStocks(FleetPtrVector &Fleets, StockPtrVector &Stocks)
This will select the fleets and stocks required to calculate the Recaptures likelihood score.
Definition: recapture.cc:247
virtual void Print(ofstream &outfile) const
This function will print the summary Recaptures likelihood information.
Definition: recapture.cc:412
virtual void addLikelihood(const TimeClass *const TimeInfo)
This function will calculate the likelihood score for the Recaptures component.
Definition: recapture.cc:322
virtual void Reset(const Keeper *const keeper)
This function will reset the Recaptures likelihood information.
Definition: recapture.cc:234
Recaptures(CommentStream &infile, const AreaClass *const Area, const TimeClass *const TimeInfo, double weight, TagPtrVector Tag, const char *name)
This is the Recaptures constructor.
Definition: recapture.cc:14
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