Gadget
|
This is the class used to calculate the likelihood scores based on population errors arising from incorrect migration. More...
#include <migrationpenalty.h>
Public Member Functions | |
MigrationPenalty (CommentStream &infile, double weight, const char *name) | |
This is the default MigrationPenalty constructor. More... | |
virtual | ~MigrationPenalty () |
This is the default MigrationPenalty destructor. More... | |
virtual void | addLikelihood (const TimeClass *const TimeInfo) |
This function will calculate the likelihood score for the current model. More... | |
void | setFleetsAndStocks (FleetPtrVector &Fleets, StockPtrVector &Stocks) |
This will select the fleets and stocks required to calculate the MigrationPenalty likelihood score. More... | |
virtual void | Reset (const Keeper *const keeper) |
This function will reset the MigrationPenalty likelihood information. More... | |
virtual void | printSummary (ofstream &outfile) |
This function will print summary information from the MigrationPenalty likelihood calculation. More... | |
virtual void | Print (ofstream &outfile) const |
This function will print the summary MigrationPenalty likelihood information. More... | |
![]() | |
Likelihood (LikelihoodType T, double w, const char *givenname) | |
This is the default Likelihood constructor. More... | |
virtual | ~Likelihood () |
This is the default Likelihood destructor. More... | |
virtual void | addLikelihoodKeeper (const TimeClass *const TimeInfo, Keeper *const keeper) |
This function will calculate the likelihood score for the current model after adjusting the parameters. More... | |
virtual void | Reset (const TimeClass *const TimeInfo) |
This function will reset the likelihood information. More... | |
virtual void | printLikelihood (ofstream &outfile, const TimeClass *const TimeInfo) |
This function will print information from each likelihood calculation. More... | |
double | getLikelihood () const |
This will return the weighted likelihood score for the likelihood component. More... | |
LikelihoodType | getType () const |
This will return the type of likelihood class. More... | |
double | getUnweightedLikelihood () const |
This will return the unweighted likelihood score for the likelihood component. More... | |
double | getWeight () const |
This will return the weight applied to the likelihood component. More... | |
![]() | |
HasName () | |
This is the default HasName constructor. More... | |
virtual | ~HasName () |
This is the default HasName destructor. More... | |
HasName (const char *givenname) | |
This is the HasName constructor for a specified name. More... | |
const char * | getName () const |
This will return a null terminated text string containing the name of the object. More... | |
Additional Inherited Members | |
![]() | |
double | likelihood |
This stores the calculated score for the likelihood component. More... | |
double | weight |
This stores the weight to be applied to the likelihood component. More... | |
This is the class used to calculate the likelihood scores based on population errors arising from incorrect migration.
This class calculates a penalty that is applied if there are insufficient fish of a particular stock on a particular area, due to changes in the migration of the stock. This can lead to values for the migration matrices that are meaningless. This can quickly lead to a model that is very wrong, and so this gets a high penalty. A 'reasonable' model will have a zero likelihood score from this component.
MigrationPenalty::MigrationPenalty | ( | CommentStream & | infile, |
double | weight, | ||
const char * | name | ||
) |
This is the default MigrationPenalty constructor.
infile | is the CommentStream to read the likelihood parameters from |
weight | is the weight for the likelihood component |
name | is the name for the likelihood component |
|
virtual |
This is the default MigrationPenalty destructor.
|
virtual |
This function will calculate the likelihood score for the current model.
TimeInfo | is the TimeClass for the current model |
Implements Likelihood.
|
virtual |
This function will print the summary MigrationPenalty likelihood information.
outfile | is the ofstream that all the model information gets sent to |
Implements Likelihood.
|
virtual |
This function will print summary information from the MigrationPenalty likelihood calculation.
outfile | is the ofstream that all the model likelihood information gets sent to |
Reimplemented from Likelihood.
|
virtual |
This function will reset the MigrationPenalty likelihood information.
keeper | is the Keeper for the current model |
Reimplemented from Likelihood.
|
virtual |
This will select the fleets and stocks required to calculate the MigrationPenalty likelihood score.
Fleets | is the FleetPtrVector of all the available fleets |
Stocks | is the StockPtrVector of all the available stocks |
Reimplemented from Likelihood.