Gadget
boundlikelihood.h
Go to the documentation of this file.
1 #ifndef boundlikelihood_h
2 #define boundlikelihood_h
3 
4 #include "likelihood.h"
5 #include "areatime.h"
6 #include "commentstream.h"
7 #include "intvector.h"
8 #include "doublevector.h"
9 #include "parametervector.h"
10 
17 class BoundLikelihood : public Likelihood {
18 public:
28  BoundLikelihood(CommentStream& infile, const AreaClass* const Area,
29  const TimeClass* const TimeInfo, const Keeper* const keeper, double weight, const char* name);
33  virtual ~BoundLikelihood() {};
38  void Reset(const Keeper* const keeper);
44  virtual void addLikelihood(const TimeClass* const TimeInfo) {};
49  virtual void printSummary(ofstream& outfile);
56  virtual void addLikelihoodKeeper(const TimeClass* const TimeInfo, Keeper* const keeper);
62  virtual void Print(ofstream& outfile) const;
63 protected:
103  double defLW;
107  double defUW;
111  double defPower;
112 private:
116  int checkInitialised;
117 };
118 
119 #endif
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 the likelihood scores based on the bounds of the parameters for t...
Definition: boundlikelihood.h:17
DoubleVector upperbound
This is the DoubleVector of the upper bounds.
Definition: boundlikelihood.h:71
DoubleVector lowerweights
This is the DoubleVector of the weights applied when the lower bound has been exceeded.
Definition: boundlikelihood.h:83
BoundLikelihood(CommentStream &infile, const AreaClass *const Area, const TimeClass *const TimeInfo, const Keeper *const keeper, double weight, const char *name)
This is the default BoundLikelihood contructor.
Definition: boundlikelihood.cc:10
DoubleVector upperweights
This is the DoubleVector of the weights applied when the upper bound has been exceeded.
Definition: boundlikelihood.h:87
DoubleVector likelihoods
This is the DoubleVector of the penalty applied when the bound has been exceeded.
Definition: boundlikelihood.h:91
ParameterVector switches
This is the ParameterVector of the names of the input parameters.
Definition: boundlikelihood.h:95
virtual void addLikelihoodKeeper(const TimeClass *const TimeInfo, Keeper *const keeper)
This function will calculate the likelihood score for the current model after adjusting the parameter...
Definition: boundlikelihood.cc:138
double defUW
This is the default weight applied when the upper bound is exceeded.
Definition: boundlikelihood.h:107
DoubleVector lowerbound
This is the DoubleVector of the lower bounds.
Definition: boundlikelihood.h:75
DoubleVector powers
This is the DoubleVector of the power applied when the bound has been exceeded.
Definition: boundlikelihood.h:79
void Reset(const Keeper *const keeper)
This function will reset the bounds information for the likelihood calculation.
Definition: boundlikelihood.cc:45
virtual void Print(ofstream &outfile) const
This function will print the summary MigrationPenalty likelihood information.
Definition: boundlikelihood.cc:189
virtual void addLikelihood(const TimeClass *const TimeInfo)
This function will calculate the likelihood score for the current model.
Definition: boundlikelihood.h:44
DoubleVector values
This is the DoubleVector used to temporarily store the values of the parameters.
Definition: boundlikelihood.h:99
double defPower
This is the default power applied when the bound is exceeded.
Definition: boundlikelihood.h:111
virtual void printSummary(ofstream &outfile)
This function will print summary information from the BoundLikelihood likelihood calculation.
Definition: boundlikelihood.cc:179
double defLW
This is the default weight applied when the lower bound is exceeded.
Definition: boundlikelihood.h:103
IntVector switchnr
This is the IntVector of the index of the parameters.
Definition: boundlikelihood.h:67
virtual ~BoundLikelihood()
This is the default BoundLikelihood destructor.
Definition: boundlikelihood.h:33
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 Parameter values.
Definition: parametervector.h:12
This is the class used to store information about the timesteps used for the current model.
Definition: areatime.h:87