GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GOptimizerFunction Class Referenceabstract

Optimizer function abstract base class. More...

#include <GOptimizerFunction.hpp>

Inheritance diagram for GOptimizerFunction:
GObservations::likelihood

Public Member Functions

 GOptimizerFunction (void)
 Void constructor. More...
 
 GOptimizerFunction (const GOptimizerFunction &fct)
 Copy constructor. More...
 
virtual ~GOptimizerFunction (void)
 Destructor. More...
 
virtual GOptimizerFunctionoperator= (const GOptimizerFunction &fct)
 Assignment operator. More...
 
virtual void eval (const GOptimizerPars &pars)=0
 
virtual double value (void) const =0
 
virtual GVectorgradient (void)=0
 
virtual GMatrixSparsecurvature (void)=0
 

Protected Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const GOptimizerFunction &fct)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Detailed Description

Optimizer function abstract base class.

This class provides an abstract interface for the function that is used by the GOptimizer optimization class.

The eval() method returns the function value at a given set of parameters that is defined by an instance of the optimizer parameter container class GOptimizerPars. The value() method returns the actual function value at these parameters, and the gradient() and covar() methods return pointers on the gradient vector and the covariance matrix at the parameter values.

Definition at line 50 of file GOptimizerFunction.hpp.

Constructor & Destructor Documentation

GOptimizerFunction::GOptimizerFunction ( void  )

Void constructor.

Definition at line 48 of file GOptimizerFunction.cpp.

References init_members().

GOptimizerFunction::GOptimizerFunction ( const GOptimizerFunction fct)

Copy constructor.

Parameters
[in]fctOptimizer function.

Definition at line 63 of file GOptimizerFunction.cpp.

References copy_members(), and init_members().

GOptimizerFunction::~GOptimizerFunction ( void  )
virtual

Destructor.

Definition at line 79 of file GOptimizerFunction.cpp.

References free_members().

Member Function Documentation

void GOptimizerFunction::copy_members ( const GOptimizerFunction fct)
protected

Copy class members.

Parameters
[in]fctOptimizer function.

Definition at line 149 of file GOptimizerFunction.cpp.

Referenced by GOptimizerFunction(), and operator=().

virtual GMatrixSparse* GOptimizerFunction::curvature ( void  )
pure virtual
virtual void GOptimizerFunction::eval ( const GOptimizerPars pars)
pure virtual
void GOptimizerFunction::free_members ( void  )
protected

Delete class members.

Definition at line 159 of file GOptimizerFunction.cpp.

Referenced by operator=(), and ~GOptimizerFunction().

virtual GVector* GOptimizerFunction::gradient ( void  )
pure virtual
void GOptimizerFunction::init_members ( void  )
protected

Initialise class members.

Definition at line 137 of file GOptimizerFunction.cpp.

Referenced by GOptimizerFunction(), and operator=().

GOptimizerFunction & GOptimizerFunction::operator= ( const GOptimizerFunction fct)
virtual

Assignment operator.

Parameters
[in]fctOptimizer function.
Returns
Optimizer function.

Definition at line 101 of file GOptimizerFunction.cpp.

References copy_members(), free_members(), and init_members().

Referenced by GObservations::likelihood::operator=().

virtual double GOptimizerFunction::value ( void  ) const
pure virtual

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