SG++-Doxygen-Documentation
sgpp::optimization::VectorFunction Class Referenceabstract

Abstract base class for vector-valued functions \(g\colon [0, 1]^d \to \mathbb{R}^m\) (e.g., equality/inequality constraints \(g(\vec{x}) \le \vec{0}\) or \(g(\vec{x}) = \vec{0}\) in optimization). More...

#include <VectorFunction.hpp>

Inheritance diagram for sgpp::optimization::VectorFunction:
sgpp::optimization::InterpolantVectorFunction sgpp::optimization::test_problems::TestVectorFunction sgpp::optimization::WrapperVectorFunction sgpp::optimization::test_problems::FloudasEqualityConstraint sgpp::optimization::test_problems::FloudasInequalityConstraint sgpp::optimization::test_problems::G03EqualityConstraint sgpp::optimization::test_problems::G03InequalityConstraint sgpp::optimization::test_problems::G04EqualityConstraint sgpp::optimization::test_problems::G04InequalityConstraint sgpp::optimization::test_problems::G05EqualityConstraint sgpp::optimization::test_problems::G05InequalityConstraint sgpp::optimization::test_problems::G06EqualityConstraint sgpp::optimization::test_problems::G06InequalityConstraint sgpp::optimization::test_problems::G08EqualityConstraint sgpp::optimization::test_problems::G08InequalityConstraint sgpp::optimization::test_problems::G09EqualityConstraint sgpp::optimization::test_problems::G09InequalityConstraint sgpp::optimization::test_problems::G10EqualityConstraint sgpp::optimization::test_problems::G10InequalityConstraint sgpp::optimization::test_problems::G11EqualityConstraint sgpp::optimization::test_problems::G11InequalityConstraint sgpp::optimization::test_problems::G12EqualityConstraint sgpp::optimization::test_problems::G12InequalityConstraint sgpp::optimization::test_problems::G13EqualityConstraint sgpp::optimization::test_problems::G13InequalityConstraint sgpp::optimization::test_problems::SimionescuEqualityConstraint sgpp::optimization::test_problems::SimionescuInequalityConstraint sgpp::optimization::test_problems::SolandEqualityConstraint sgpp::optimization::test_problems::SolandInequalityConstraint

Public Member Functions

virtual void clone (std::unique_ptr< VectorFunction > &clone) const =0
 Pure virtual method for cloning the function. More...
 
virtual void eval (const base::DataVector &x, base::DataVector &value)=0
 Pure virtual method for calculating \(g(\vec{x})\). More...
 
size_t getNumberOfComponents () const
 
size_t getNumberOfParameters () const
 
 VectorFunction (size_t d, size_t m)
 Constructor. More...
 
virtual ~VectorFunction ()
 Destructor. More...
 

Protected Attributes

size_t d
 dimension of the domain More...
 
size_t m
 number of components More...
 

Detailed Description

Abstract base class for vector-valued functions \(g\colon [0, 1]^d \to \mathbb{R}^m\) (e.g., equality/inequality constraints \(g(\vec{x}) \le \vec{0}\) or \(g(\vec{x}) = \vec{0}\) in optimization).

Constructor & Destructor Documentation

◆ VectorFunction()

sgpp::optimization::VectorFunction::VectorFunction ( size_t  d,
size_t  m 
)
inline

Constructor.

Parameters
ddimension of the domain
mnumber of components

◆ ~VectorFunction()

virtual sgpp::optimization::VectorFunction::~VectorFunction ( )
inlinevirtual

Destructor.

References eval().

Member Function Documentation

◆ clone()

virtual void sgpp::optimization::VectorFunction::clone ( std::unique_ptr< VectorFunction > &  clone) const
pure virtual

Pure virtual method for cloning the function.

It should generate a pointer to the cloned object and it's used for parallel computations (the eval() method might not be thread-safe).

Parameters
[out]clonepointer to cloned object

Implemented in sgpp::optimization::test_problems::G04EqualityConstraint, sgpp::optimization::test_problems::G05EqualityConstraint, sgpp::optimization::test_problems::G09EqualityConstraint, sgpp::optimization::test_problems::G10EqualityConstraint, sgpp::optimization::test_problems::G03EqualityConstraint, sgpp::optimization::test_problems::FloudasEqualityConstraint, sgpp::optimization::test_problems::G08EqualityConstraint, sgpp::optimization::test_problems::G13EqualityConstraint, sgpp::optimization::test_problems::G06EqualityConstraint, sgpp::optimization::test_problems::G12EqualityConstraint, sgpp::optimization::test_problems::SimionescuEqualityConstraint, sgpp::optimization::test_problems::G11EqualityConstraint, sgpp::optimization::test_problems::SolandEqualityConstraint, sgpp::optimization::test_problems::G04InequalityConstraint, sgpp::optimization::test_problems::G09InequalityConstraint, sgpp::optimization::test_problems::G10InequalityConstraint, sgpp::optimization::test_problems::FloudasInequalityConstraint, sgpp::optimization::test_problems::G05InequalityConstraint, sgpp::optimization::test_problems::G08InequalityConstraint, sgpp::optimization::InterpolantVectorFunction, sgpp::optimization::test_problems::G06InequalityConstraint, sgpp::optimization::test_problems::G03InequalityConstraint, sgpp::optimization::test_problems::G12InequalityConstraint, sgpp::optimization::test_problems::SimionescuInequalityConstraint, sgpp::optimization::test_problems::G11InequalityConstraint, sgpp::optimization::test_problems::G13InequalityConstraint, sgpp::optimization::test_problems::SolandInequalityConstraint, and sgpp::optimization::WrapperVectorFunction.

Referenced by sgpp::optimization::optimizer::ConstrainedOptimizer::ConstrainedOptimizer(), getNumberOfComponents(), and sgpp::optimization::optimizer::LeastSquaresOptimizer::LeastSquaresOptimizer().

◆ eval()

virtual void sgpp::optimization::VectorFunction::eval ( const base::DataVector x,
base::DataVector value 
)
pure virtual

Pure virtual method for calculating \(g(\vec{x})\).

Parameters
[in]xevaluation point \(\vec{x} \in [0, 1]^d\)
[out]value\(g(\vec{x})\)

Implemented in sgpp::optimization::InterpolantVectorFunction, sgpp::optimization::test_problems::TestVectorFunction, and sgpp::optimization::WrapperVectorFunction.

Referenced by sgpp::optimization::ComponentScalarFunction::eval(), and ~VectorFunction().

◆ getNumberOfComponents()

size_t sgpp::optimization::VectorFunction::getNumberOfComponents ( ) const
inline
Returns
number \(m\) of components

References clone(), and m.

◆ getNumberOfParameters()

size_t sgpp::optimization::VectorFunction::getNumberOfParameters ( ) const
inline
Returns
dimension \(d\) of the domain

References d.

Member Data Documentation

◆ d

◆ m

size_t sgpp::optimization::VectorFunction::m
protected

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