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

Abstract base class for scalar-valued functions \(f\colon [0, 1]^d \to \mathbb{R}\) together with their gradients \(\nabla f\colon [0, 1]^d \to \mathbb{R}^d\) and Hessians \(H_f\colon [0, 1]^d \to \mathbb{R}^{d \times d}\) (e.g., Hessians of objective functions in optimization). More...

#include <ScalarFunctionHessian.hpp>

Inheritance diagram for sgpp::optimization::ScalarFunctionHessian:
sgpp::optimization::ComponentScalarFunctionHessian sgpp::optimization::InterpolantScalarFunctionHessian sgpp::optimization::WrapperScalarFunctionHessian

Public Member Functions

virtual void clone (std::unique_ptr< ScalarFunctionHessian > &clone) const =0
 Pure virtual method for cloning the Hessian. More...
 
virtual double eval (const base::DataVector &x, base::DataVector &gradient, base::DataMatrix &hessian)=0
 Pure virtual method for calculating \(f(\vec{x})\) together with \(\nabla f(\vec{x})\) and \(H_f(\vec{x}) \in \mathbb{R}^{d \times d}\). More...
 
size_t getNumberOfParameters () const
 
 ScalarFunctionHessian (size_t d)
 Constructor. More...
 
virtual ~ScalarFunctionHessian ()
 Destructor. More...
 

Protected Attributes

size_t d
 dimension of the domain More...
 

Detailed Description

Abstract base class for scalar-valued functions \(f\colon [0, 1]^d \to \mathbb{R}\) together with their gradients \(\nabla f\colon [0, 1]^d \to \mathbb{R}^d\) and Hessians \(H_f\colon [0, 1]^d \to \mathbb{R}^{d \times d}\) (e.g., Hessians of objective functions in optimization).

Constructor & Destructor Documentation

◆ ScalarFunctionHessian()

sgpp::optimization::ScalarFunctionHessian::ScalarFunctionHessian ( size_t  d)
inlineexplicit

Constructor.

Parameters
ddimension of the domain

◆ ~ScalarFunctionHessian()

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

Destructor.

References eval().

Member Function Documentation

◆ clone()

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

Pure virtual method for cloning the Hessian.

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::ComponentScalarFunctionHessian, sgpp::optimization::InterpolantScalarFunctionHessian, and sgpp::optimization::WrapperScalarFunctionHessian.

Referenced by sgpp::optimization::optimizer::AdaptiveNewton::AdaptiveNewton(), getNumberOfParameters(), and sgpp::optimization::optimizer::Newton::Newton().

◆ eval()

virtual double sgpp::optimization::ScalarFunctionHessian::eval ( const base::DataVector x,
base::DataVector gradient,
base::DataMatrix hessian 
)
pure virtual

Pure virtual method for calculating \(f(\vec{x})\) together with \(\nabla f(\vec{x})\) and \(H_f(\vec{x}) \in \mathbb{R}^{d \times d}\).

Parameters
xevaluation point \(\vec{x} \in [0, 1]^d\)
[out]gradientgradient \(\nabla f(\vec{x}) \in \mathbb{R}^d\)
[out]hessianHessian matrix \(H_f(\vec{x}) \in \mathbb{R}^{d \times d}\)
Returns
\(f(\vec{x})\)

Implemented in sgpp::optimization::ComponentScalarFunctionHessian, sgpp::optimization::InterpolantScalarFunctionHessian, and sgpp::optimization::WrapperScalarFunctionHessian.

Referenced by sgpp::optimization::ComponentScalarFunctionHessian::eval(), and ~ScalarFunctionHessian().

◆ getNumberOfParameters()

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

References clone(), and d.

Member Data Documentation

◆ d

size_t sgpp::optimization::ScalarFunctionHessian::d
protected

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