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

Abstract base class for vector-valued functions \(g\colon [0, 1]^d \to \mathbb{R}^m\) together with their Jacobians \(\nabla g\colon [0, 1]^d \to \mathbb{R}^{m \times d}\), i.e. More...

#include <VectorFunctionGradient.hpp>

Inheritance diagram for sgpp::optimization::VectorFunctionGradient:
sgpp::optimization::InterpolantVectorFunctionGradient sgpp::optimization::WrapperVectorFunctionGradient

Public Member Functions

virtual void clone (std::unique_ptr< VectorFunctionGradient > &clone) const =0
 Pure virtual method for cloning the gradient. More...
 
virtual void eval (const base::DataVector &x, base::DataVector &value, base::DataMatrix &gradient)=0
 Pure virtual method for calculating \(g(\vec{x})\) together with \(\nabla g(\vec{x})\). More...
 
size_t getNumberOfComponents () const
 
size_t getNumberOfParameters () const
 
 VectorFunctionGradient (size_t d, size_t m)
 Constructor. More...
 
virtual ~VectorFunctionGradient ()
 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\) together with their Jacobians \(\nabla g\colon [0, 1]^d \to \mathbb{R}^{m \times d}\), i.e.

\((\nabla g)_{i,t} = \frac{\partial}{\partial x_t} g_i\) with \(g = (g_i)_{i=1}^m\) (e.g., equality/inequality constraints \(g(\vec{x}) \le \vec{0}\) or \(g(\vec{x}) = \vec{0}\) in optimization).

Constructor & Destructor Documentation

◆ VectorFunctionGradient()

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

Constructor.

Parameters
ddimension of the domain
mnumber of components

◆ ~VectorFunctionGradient()

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

Destructor.

References eval().

Member Function Documentation

◆ clone()

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

Pure virtual method for cloning the gradient.

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::InterpolantVectorFunctionGradient, and sgpp::optimization::WrapperVectorFunctionGradient.

Referenced by sgpp::optimization::optimizer::AugmentedLagrangian::AugmentedLagrangian(), getNumberOfComponents(), sgpp::optimization::optimizer::LevenbergMarquardt::LevenbergMarquardt(), sgpp::optimization::optimizer::LogBarrier::LogBarrier(), and sgpp::optimization::optimizer::SquaredPenalty::SquaredPenalty().

◆ eval()

virtual void sgpp::optimization::VectorFunctionGradient::eval ( const base::DataVector x,
base::DataVector value,
base::DataMatrix gradient 
)
pure virtual

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

Parameters
[in]xevaluation point \(\vec{x} \in [0, 1]^d\)
[out]value\(g(\vec{x})\)
[out]gradientgradient \(\nabla g(\vec{x}) \in \mathbb{R}^{m \times d}\)

Implemented in sgpp::optimization::InterpolantVectorFunctionGradient, and sgpp::optimization::WrapperVectorFunctionGradient.

Referenced by sgpp::optimization::ComponentScalarFunctionGradient::eval(), and ~VectorFunctionGradient().

◆ getNumberOfComponents()

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

References clone(), and m.

◆ getNumberOfParameters()

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

References d.

Member Data Documentation

◆ d

size_t sgpp::optimization::VectorFunctionGradient::d
protected

◆ m

size_t sgpp::optimization::VectorFunctionGradient::m
protected

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