GammaLib
2.1.0.dev
|
Abstract optimizer abstract base class. More...
#include <GOptimizer.hpp>
Public Member Functions | |
GOptimizer (void) | |
Constructor. More... | |
GOptimizer (const GOptimizer &opt) | |
Copy constructor. More... | |
virtual | ~GOptimizer (void) |
Destructor. More... | |
virtual GOptimizer & | operator= (const GOptimizer &opt) |
Assignment operator. More... | |
virtual void | clear (void)=0 |
Clear object. More... | |
virtual GOptimizer * | clone (void) const =0 |
Clones object. More... | |
virtual std::string | classname (void) const =0 |
Return class name. More... | |
virtual void | optimize (GOptimizerFunction &fct, GOptimizerPars &pars)=0 |
virtual void | errors (GOptimizerFunction &fct, GOptimizerPars &pars)=0 |
virtual double | value (void) const =0 |
virtual int | status (void) const =0 |
virtual int | iter (void) const =0 |
virtual std::string | print (const GChatter &chatter=NORMAL) const =0 |
Print content of object. More... | |
Public Member Functions inherited from GBase | |
virtual | ~GBase (void) |
Destructor. More... | |
Protected Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GOptimizer &opt) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Abstract optimizer abstract base class.
This class defines the abstract interface for the optimizer class. The optimizer class is used to optimize the parameters of a function. The function is implemented using the abstract GOptimizerFunction class while the parameters are implemented using the abstract GOptimizerPars class.
The main driver of this class is the optimize() method which optimizes the parameters using a function. The function value can be accessed using the value() method, the status() method provides an integer with status information, the iter() method gives the number of iterations for iterative optimization algorithms.
Definition at line 54 of file GOptimizer.hpp.
GOptimizer::GOptimizer | ( | void | ) |
GOptimizer::GOptimizer | ( | const GOptimizer & | opt | ) |
Copy constructor.
[in] | opt | Optimizer. |
Definition at line 63 of file GOptimizer.cpp.
References copy_members(), and init_members().
|
virtual |
|
pure virtual |
Return class name.
Returns the class name for non-abstract classes in a human readable way.
Implements GBase.
Implemented in GOptimizerLM.
|
pure virtual |
Clear object.
Sets the object to a clean initial state. After calling the method the object will be in the same state as it were if an empty instance of the object would have been created.
Implements GBase.
Implemented in GOptimizerLM.
|
pure virtual |
Clones object.
Creates a deep copy of the object and returns a pointer to the object.
Implements GBase.
Implemented in GOptimizerLM.
|
protected |
Copy class members.
[in] | opt | Optimizer. |
Definition at line 149 of file GOptimizer.cpp.
Referenced by GOptimizer(), and operator=().
|
pure virtual |
Implemented in GOptimizerLM.
Referenced by GObservations::errors().
|
protected |
Delete class members.
Definition at line 159 of file GOptimizer.cpp.
Referenced by GOptimizerLM::clear(), operator=(), and ~GOptimizer().
|
protected |
Initialise class members.
Definition at line 137 of file GOptimizer.cpp.
Referenced by GOptimizerLM::clear(), GOptimizer(), and operator=().
|
pure virtual |
Implemented in GOptimizerLM.
|
virtual |
Assignment operator.
[in] | opt | Optimizer. |
Definition at line 101 of file GOptimizer.cpp.
References copy_members(), free_members(), and init_members().
Referenced by GOptimizerLM::operator=().
|
pure virtual |
Implemented in GOptimizerLM.
Referenced by GObservations::optimize().
Print content of object.
[in] | chatter | Chattiness (defaults to NORMAL). |
Formats the content in a standard way and puts this content in a C++ string that is returned.
Implements GBase.
Implemented in GOptimizerLM.
|
pure virtual |
Implemented in GOptimizerLM.
|
pure virtual |
Implemented in GOptimizerLM.