SG++-Doxygen-Documentation
sgpp::optimization::optimizer::ConstrainedOptimizer Class Reference

Abstract class for solving constrained optimization problems. More...

#include <ConstrainedOptimizer.hpp>

Inheritance diagram for sgpp::optimization::optimizer::ConstrainedOptimizer:
sgpp::optimization::optimizer::UnconstrainedOptimizer sgpp::optimization::optimizer::AugmentedLagrangian sgpp::optimization::optimizer::LogBarrier sgpp::optimization::optimizer::SquaredPenalty

Public Member Functions

 ConstrainedOptimizer (const ScalarFunction &f, const VectorFunction &g, const VectorFunction &h, size_t N=DEFAULT_N)
 Constructor. More...
 
 ConstrainedOptimizer (const ConstrainedOptimizer &other)
 Copy constructor. More...
 
VectorFunctiongetEqualityConstraintFunction () const
 
VectorFunctiongetInequalityConstraintFunction () const
 
 ~ConstrainedOptimizer () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
virtual void clone (std::unique_ptr< UnconstrainedOptimizer > &clone) const =0
 Pure virtual method for cloning the optimizer. More...
 
const base::DataMatrixgetHistoryOfOptimalPoints () const
 
const base::DataVectorgetHistoryOfOptimalValues () const
 
size_t getN () const
 
ScalarFunctiongetObjectiveFunction () const
 
const base::DataVectorgetOptimalPoint () const
 
double getOptimalValue () const
 
const base::DataVectorgetStartingPoint () const
 
virtual void optimize ()=0
 Pure virtual method for optimization of the objective function. More...
 
void setN (size_t N)
 
void setStartingPoint (const base::DataVector &startingPoint)
 
 UnconstrainedOptimizer (const ScalarFunction &f, size_t N=DEFAULT_N)
 Constructor. More...
 
 UnconstrainedOptimizer (const UnconstrainedOptimizer &other)
 Copy constructor. More...
 
virtual ~UnconstrainedOptimizer ()
 Destructor. More...
 

Protected Attributes

std::unique_ptr< VectorFunctiong
 inequality constraint function More...
 
std::unique_ptr< VectorFunctionh
 equality constraint function More...
 
- Protected Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
std::unique_ptr< ScalarFunctionf
 objective function More...
 
base::DataVector fHist
 search history vector (optimal values) More...
 
double fOpt
 result of optimization (optimal function value) More...
 
size_t N
 maximal number of iterations or function evaluations More...
 
base::DataVector x0
 starting point More...
 
base::DataMatrix xHist
 search history matrix (optimal points) More...
 
base::DataVector xOpt
 result of optimization (location of optimum) More...
 

Additional Inherited Members

- Static Public Attributes inherited from sgpp::optimization::optimizer::UnconstrainedOptimizer
static const size_t DEFAULT_N = 1000
 default maximal number of iterations or function evaluations More...
 

Detailed Description

Abstract class for solving constrained optimization problems.

Constructor & Destructor Documentation

◆ ConstrainedOptimizer() [1/2]

sgpp::optimization::optimizer::ConstrainedOptimizer::ConstrainedOptimizer ( const ScalarFunction f,
const VectorFunction g,
const VectorFunction h,
size_t  N = DEFAULT_N 
)
inline

Constructor.

The starting point is set to \((0.5, \dotsc, 0.5)^{\mathrm{T}}\). Depending on the implementation $g$ and/or $h$ may be ignored (if only equality or inequality constraints can be handled by the underlying algorithm).

Parameters
ffunction to optimize
ginequality constraint function ( \(g(\vec{x}) \le 0\))
hequality constraint function ( \(h(\vec{x}) = 0\))
Nmaximal number of iterations or objective function evaluations (depending on the implementation)

References sgpp::optimization::VectorFunction::clone().

◆ ConstrainedOptimizer() [2/2]

sgpp::optimization::optimizer::ConstrainedOptimizer::ConstrainedOptimizer ( const ConstrainedOptimizer other)
inline

Copy constructor.

Parameters
otheroptimizer to be copied

References g, and h.

◆ ~ConstrainedOptimizer()

sgpp::optimization::optimizer::ConstrainedOptimizer::~ConstrainedOptimizer ( )
inlineoverride

Destructor.

Member Function Documentation

◆ getEqualityConstraintFunction()

VectorFunction& sgpp::optimization::optimizer::ConstrainedOptimizer::getEqualityConstraintFunction ( ) const
inline
Returns
equality constraint function

References h.

◆ getInequalityConstraintFunction()

VectorFunction& sgpp::optimization::optimizer::ConstrainedOptimizer::getInequalityConstraintFunction ( ) const
inline
Returns
inequality constraint function

References g.

Member Data Documentation

◆ g

◆ h


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