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

This is the base class used to perform the optimisation calculation for the model. More...

#include <optinfo.h>

Inheritance diagram for OptInfo:
Inheritance graph
Collaboration diagram for OptInfo:
Collaboration graph

Public Member Functions

 OptInfo ()
 This is the default OptInfo constructor. More...
 
virtual ~OptInfo ()
 This is the default OptInfo destructor. More...
 
virtual void read (CommentStream &infile, char *text)
 This is the function used to read in the optimisation parameters. More...
 
virtual void Print (ofstream &outfile, int prec)
 This function will print information from the optimisation algorithm. More...
 
virtual void OptimiseLikelihood ()
 This is the function used to call the optimisation algorithms. More...
 
OptType getType () const
 This will return the type of optimisation class. More...
 

Protected Attributes

int converge
 This is the flag used to denote whether the optimisation converged or not. More...
 
int iters
 This is the number of iterations that took place during the optimisation. More...
 
double score
 This is the value of the best likelihood score from the optimisation. More...
 
OptType type
 This denotes what type of optimisation class has been created. More...
 

Detailed Description

This is the base class used to perform the optimisation calculation for the model.

Note
This will always be overridden by the derived classes that actually perform the optimisation calculation

Constructor & Destructor Documentation

◆ OptInfo()

OptInfo::OptInfo ( )
inline

This is the default OptInfo constructor.

◆ ~OptInfo()

virtual OptInfo::~OptInfo ( )
inlinevirtual

This is the default OptInfo destructor.

Member Function Documentation

◆ getType()

OptType OptInfo::getType ( ) const
inline

This will return the type of optimisation class.

Returns
type

◆ OptimiseLikelihood()

virtual void OptInfo::OptimiseLikelihood ( )
inlinevirtual

This is the function used to call the optimisation algorithms.

Reimplemented in OptInfoBFGS, OptInfoSimann, and OptInfoHooke.

◆ Print()

virtual void OptInfo::Print ( ofstream &  outfile,
int  prec 
)
inlinevirtual

This function will print information from the optimisation algorithm.

Parameters
outfileis the ofstream that the optimisation information gets sent to
precis the precision to use in the output file

Reimplemented in OptInfoBFGS, OptInfoSimann, and OptInfoHooke.

◆ read()

virtual void OptInfo::read ( CommentStream infile,
char *  text 
)
inlinevirtual

This is the function used to read in the optimisation parameters.

Parameters
infileis the CommentStream to read the optimisation parameters from
textis a text string used to compare parameter names

Reimplemented in OptInfoBFGS, OptInfoSimann, and OptInfoHooke.

Member Data Documentation

◆ converge

int OptInfo::converge
protected

This is the flag used to denote whether the optimisation converged or not.

◆ iters

int OptInfo::iters
protected

This is the number of iterations that took place during the optimisation.

◆ score

double OptInfo::score
protected

This is the value of the best likelihood score from the optimisation.

◆ type

OptType OptInfo::type
protected

This denotes what type of optimisation class has been created.


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