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

This is really a prediction class. More...

#include <proglikelihood.h>

Inheritance diagram for ProgLikelihood:
Inheritance graph
Collaboration diagram for ProgLikelihood:
Collaboration graph

Public Member Functions

 ProgLikelihood (CommentStream &infile, const AreaClass *const Area, const TimeClass *const TimeInfo, Keeper *const keeper, double weight, const char *name)
 This is the default BoundLikelihood contructor. More...
 
virtual ~ProgLikelihood ()
 This is the default BoundLikelihood 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 likelihood score. More...
 
void Reset (const Keeper *const keeper)
 This function will reset the likelihood information. More...
 
void Reset (const TimeClass *const TimeInfo)
 This function will reset the likelihood information. More...
 
virtual void PrintLog (ofstream &outfile) const
 
virtual void Print (ofstream &outfile) const
 This function will print the summary likelihood information. More...
 
virtual void printLikelihood (ofstream &outfile, const TimeClass *const TimeInfo)
 This function will print information from each 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 printSummary (ofstream &outfile)
 This function will print summary 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...
 
- 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 Member Functions

void CalcTac (const TimeClass *const TimeInfo)
 
void AllocateTac (const TimeClass *const TimeInfo)
 
void CalcBiomass (const TimeClass *const TimeInfo)
 

Additional Inherited Members

- 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 really a prediction class.

Constructor & Destructor Documentation

◆ ProgLikelihood()

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

This is the default BoundLikelihood contructor.

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

triggerbio.Read(infile,keeper);

◆ ~ProgLikelihood()

virtual ProgLikelihood::~ProgLikelihood ( )
inlinevirtual

This is the default BoundLikelihood destructor.

Member Function Documentation

◆ addLikelihood()

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

This function will calculate the likelihood score for the current model.

Parameters
TimeInfois the TimeClass for the current model
Note
This function is not used for this likelihood component

Implements Likelihood.

◆ AllocateTac()

void ProgLikelihood::AllocateTac ( const TimeClass *const  TimeInfo)
protected

◆ CalcBiomass()

void ProgLikelihood::CalcBiomass ( const TimeClass *const  TimeInfo)
protected

◆ CalcTac()

void ProgLikelihood::CalcTac ( const TimeClass *const  TimeInfo)
protected

◆ Print()

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

This function will print the summary likelihood information.

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

Implements Likelihood.

◆ printLikelihood()

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

This function will print information from each likelihood calculation.

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

Reimplemented from Likelihood.

◆ PrintLog()

void ProgLikelihood::PrintLog ( ofstream &  outfile) const
virtual

◆ Reset() [1/2]

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

This function will reset the likelihood information.

Parameters
keeperis the Keeper for the current model

Reimplemented from Likelihood.

◆ Reset() [2/2]

void ProgLikelihood::Reset ( const TimeClass *const  TimeInfo)
virtual

This function will reset the likelihood information.

Parameters
keeperis the Keeper for the current model

Reimplemented from Likelihood.

◆ setFleetsAndStocks()

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

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

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

Reimplemented from Likelihood.


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