Gadget
Public Member Functions | Protected Attributes | List of all members
SurveyIndices Class Reference

This is the class used to calculate a likelihood score by fitting a linear regression line to calculated and modelled survey indices. More...

#include <surveyindices.h>

Inheritance diagram for SurveyIndices:
Inheritance graph
Collaboration diagram for SurveyIndices:
Collaboration graph

Public Member Functions

 SurveyIndices (CommentStream &infile, const AreaClass *const Area, const TimeClass *const TimeInfo, double weight, const char *name)
 This is the SurveyIndices constructor. More...
 
virtual ~SurveyIndices ()
 This is the default SurveyIndices destructor. More...
 
virtual void addLikelihood (const TimeClass *const TimeInfo)
 This function will calculate the likelihood score for the SurveyIndices component. More...
 
void setFleetsAndStocks (FleetPtrVector &Fleets, StockPtrVector &Stocks)
 This will select the fleets and stocks required to calculate the SurveyIndices likelihood score. More...
 
virtual void Reset (const Keeper *const keeper)
 This function will reset the SurveyIndices likelihood information. More...
 
virtual void Print (ofstream &outfile) const
 This function will print the summary SurveyIndices likelihood information. More...
 
virtual void printLikelihood (ofstream &outfile, const TimeClass *const TimeInfo)
 This function will print information from each SurveyIndices calculation. More...
 
virtual void printSummary (ofstream &outfile)
 This function will print summary information from each SurveyIndices likelihood calculation. More...
 
- Public Member Functions inherited from Likelihood
 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...
 
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...
 
- Public Member Functions inherited from HasName
 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...
 

Protected Attributes

SIOnStepSI
 This is the SIOnStep used to calculate the likelihood score by fitting a linear regression line to the difference between the calculated indices and the input indices. More...
 
IntMatrix areas
 This is the IntMatrix used to store area information. More...
 
CharPtrVector stocknames
 This is the CharPtrVector of the names of the stocks that will be used to calculate the likelihood score. More...
 
CharPtrVector fleetnames
 This is the CharPtrVector of the names of any fleets that will be used to calculate the likelihood score. More...
 
- Protected Attributes inherited from Likelihood
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...
 

Detailed Description

This is the class used to calculate a likelihood score by fitting a linear regression line to calculated and modelled survey indices.

This class calculates a likelihood score by fitting a linear regression line to the difference between survey indices calculated within the model and survey indices calculated directly from standardized survey data. This is used to compare the relative abundance levels of the stock. The model will calculate an index for the population, and then fit a linear regression line between these calculated indices and those input from data files. The precise format of the linear regression line depends on a number of options specified by the user.

Note
This likelihood component is based on the current population, where as most likelihood components are based on the population at the beginning of the timestep. It would be better if this likelihood component was changed to be based on the population at the beginning of the timestep.

Constructor & Destructor Documentation

◆ SurveyIndices()

SurveyIndices::SurveyIndices ( CommentStream infile,
const AreaClass *const  Area,
const TimeClass *const  TimeInfo,
double  weight,
const char *  name 
)

This is the SurveyIndices constructor.

Parameters
infileis the CommentStream to read the SurveyIndices data from
Areais the AreaClass for the current model
TimeInfois the TimeClass for the current model
weightis the weight for the likelihood component
nameis the name for the likelihood component

◆ ~SurveyIndices()

SurveyIndices::~SurveyIndices ( )
virtual

This is the default SurveyIndices destructor.

Member Function Documentation

◆ addLikelihood()

void SurveyIndices::addLikelihood ( const TimeClass *const  TimeInfo)
virtual

This function will calculate the likelihood score for the SurveyIndices component.

Parameters
TimeInfois the TimeClass for the current model

Implements Likelihood.

◆ Print()

void SurveyIndices::Print ( ofstream &  outfile) const
virtual

This function will print the summary SurveyIndices likelihood information.

Parameters
outfileis the ofstream that all the model information gets sent to

Implements Likelihood.

◆ printLikelihood()

virtual void SurveyIndices::printLikelihood ( ofstream &  outfile,
const TimeClass *const  TimeInfo 
)
inlinevirtual

This function will print information from each SurveyIndices calculation.

Parameters
outfileis the ofstream that all the model likelihood information gets sent to
TimeInfois the TimeClass for the current model

Reimplemented from Likelihood.

◆ printSummary()

virtual void SurveyIndices::printSummary ( ofstream &  outfile)
inlinevirtual

This function will print summary information from each SurveyIndices likelihood calculation.

Parameters
outfileis the ofstream that all the model likelihood information gets sent to

Reimplemented from Likelihood.

◆ Reset()

void SurveyIndices::Reset ( const Keeper *const  keeper)
virtual

This function will reset the SurveyIndices likelihood information.

Parameters
keeperis the Keeper for the current model

Reimplemented from Likelihood.

◆ setFleetsAndStocks()

void SurveyIndices::setFleetsAndStocks ( FleetPtrVector Fleets,
StockPtrVector Stocks 
)
virtual

This will select the fleets and stocks required to calculate the SurveyIndices likelihood score.

Parameters
Fleetsis the FleetPtrVector of all the available fleets
Stocksis the StockPtrVector of all the available stocks

Reimplemented from Likelihood.

Member Data Documentation

◆ areas

IntMatrix SurveyIndices::areas
protected

This is the IntMatrix used to store area information.

◆ fleetnames

CharPtrVector SurveyIndices::fleetnames
protected

This is the CharPtrVector of the names of any fleets that will be used to calculate the likelihood score.

◆ SI

SIOnStep* SurveyIndices::SI
protected

This is the SIOnStep used to calculate the likelihood score by fitting a linear regression line to the difference between the calculated indices and the input indices.

◆ stocknames

CharPtrVector SurveyIndices::stocknames
protected

This is the CharPtrVector of the names of the stocks that will be used to calculate the likelihood score.


The documentation for this class was generated from the following files: