CMinimizer::Problem Class Referenceabstract

Base class for all optimization problems that can be run by CMinimizer. More...

#include <mia/core/minimizer.hh>

Inheritance diagram for CMinimizer::Problem:
[legend]
Collaboration diagram for CMinimizer::Problem:
[legend]

Public Member Functions

void df (size_t n, const double *x, double *g)
 
void df (const std::vector< double > &x, std::vector< double > &g)
 
void df (const CDoubleVector &x, CDoubleVector &g)
 
double f (size_t n, const double *x)
 
double f (const std::vector< double > &x)
 
double f (const CDoubleVector &x)
 
double fdf (size_t n, const double *x, double *g)
 
double fdf (const std::vector< double > &x, std::vector< double > &g)
 
double fdf (const CDoubleVector &x, CDoubleVector &g)
 
size_t size () const
 
virtual ~Problem ()
 
- Public Member Functions inherited from CPropertyFlagHolder
void add (const char *property)
 
Set get_missing_properties (const CPropertyFlagHolder &testset) const
 
bool has (const char *property) const
 
bool has_all_in (const CPropertyFlagHolder &testset) const
 
virtual ~CPropertyFlagHolder ()
 

Additional Inherited Members

- Public Types inherited from CPropertyFlagHolder
typedef std::set< const char * > Set
 define the type of the set of flags More...
 

Detailed Description

Base class for all optimization problems that can be run by CMinimizer.

This is the abstract base class for all optimization problems that can be run by CMinimizer. In order to implement a real optimizable problem, the abstract functions

  • virtual double do_f(const CDoubleVector& x) = 0;
  • virtual void do_df(const CDoubleVector& x, CDoubleVector& g) = 0;
  • virtual double do_fdf(const CDoubleVector& x, CDoubleVector& g) = 0;

have to be implemented in the derived class. These functions must provide the functionality as documented for the public member functions

Definition at line 80 of file minimizer.hh.

Constructor & Destructor Documentation

◆ ~Problem()

virtual CMinimizer::Problem::~Problem ( )
virtual

Member Function Documentation

◆ df() [1/3]

void CMinimizer::Problem::df ( size_t  n,
const double *  x,
double *  g 
)

The function that is called by the optimizer to evaluate the objective function gradient.

Parameters
nnumber of parameters
xvector of parameters
[out]gvector of gradient of the objective function

◆ df() [2/3]

void CMinimizer::Problem::df ( const std::vector< double > &  x,
std::vector< double > &  g 
)

The function that is called by the optimizer to evaluate the objective function gradient.

Parameters
xvector of parameters
[out]gvector of gradient of the objective function

◆ df() [3/3]

void CMinimizer::Problem::df ( const CDoubleVector x,
CDoubleVector g 
)

The function that is called by the optimizer to evaluate the objective function gradient.

Parameters
xvector of parameters
[out]gvector of gradient of the objective function

◆ f() [1/3]

double CMinimizer::Problem::f ( size_t  n,
const double *  x 
)

The function that is called by the optimizer to evaluate the objective function value.

Parameters
nnumber of parameters
xvector of parameters
Returns
function value

◆ f() [2/3]

double CMinimizer::Problem::f ( const std::vector< double > &  x)

The function that is called by the optimizer to evaluate the objective function value.

Parameters
xvector of parameters
Returns
function value

◆ f() [3/3]

double CMinimizer::Problem::f ( const CDoubleVector x)

The function that is called by the optimizer to evaluate the objective function value.

Parameters
xvector of parameters
Returns
function value

◆ fdf() [1/3]

double CMinimizer::Problem::fdf ( size_t  n,
const double *  x,
double *  g 
)

The function that is called by the optimizer to evaluate the objective function gradient and the function value.

Parameters
nnumber of parameters
xvector of parameters
[out]gvector of gradient of the objective function
Returns
objective function value

◆ fdf() [2/3]

double CMinimizer::Problem::fdf ( const std::vector< double > &  x,
std::vector< double > &  g 
)

The function that is called by the optimizer to evaluate the objective function gradient and the function value.

Parameters
xvector of parameters
[out]gvector of gradient of the objective function
Returns
objective function value

◆ fdf() [3/3]

double CMinimizer::Problem::fdf ( const CDoubleVector x,
CDoubleVector g 
)

The function that is called by the optimizer to evaluate the objective function gradient and the function value.

Parameters
xvector of parameters
[out]gvector of gradient of the objective function
Returns
objective function value

◆ size()

size_t CMinimizer::Problem::size ( ) const
Returns
number of parameters to optimize

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