SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
sgpp::base::WrapperScalarFunctionHessian Class Reference

Implementation of ScalarFunctionHessian that wraps a std::function object. More...

#include <WrapperScalarFunctionHessian.hpp>

Inheritance diagram for sgpp::base::WrapperScalarFunctionHessian:
sgpp::base::ScalarFunctionHessian

Public Types

typedef std::function< double(const DataVector &, DataVector &, DataMatrix &)> FunctionHessianEvalType
 

Public Member Functions

void clone (std::unique_ptr< ScalarFunctionHessian > &clone) const override
 
double eval (const DataVector &x, DataVector &gradient, DataMatrix &hessian) override
 
 WrapperScalarFunctionHessian (size_t d, FunctionHessianEvalType fHessian)
 Constructor.
 
 ~WrapperScalarFunctionHessian () override
 Destructor.
 
- Public Member Functions inherited from sgpp::base::ScalarFunctionHessian
void eval (const DataMatrix &x, DataVector &value, DataMatrix &gradient, std::vector< DataMatrix > &hessian)
 Convenience method for calculating \(f(\vec{x})\) together with \(\nabla f(\vec{x})\) and \(H_f(\vec{x}) \in \mathbb{R}^{d \times d}\) for multiple \(\vec{x}\).
 
size_t getNumberOfParameters () const
 
 ScalarFunctionHessian (size_t d)
 Constructor.
 
virtual ~ScalarFunctionHessian ()
 Destructor.
 

Protected Attributes

FunctionHessianEvalType fHessian
 function Hessian to be wrapped
 
- Protected Attributes inherited from sgpp::base::ScalarFunctionHessian
size_t d
 dimension of the domain
 

Detailed Description

Implementation of ScalarFunctionHessian that wraps a std::function object.

Member Typedef Documentation

◆ FunctionHessianEvalType

Constructor & Destructor Documentation

◆ WrapperScalarFunctionHessian()

sgpp::base::WrapperScalarFunctionHessian::WrapperScalarFunctionHessian ( size_t  d,
FunctionHessianEvalType  fHessian 
)
inline

Constructor.

Parameters
ddimension of the domain
fHessianfunction gradient to be wrapped

◆ ~WrapperScalarFunctionHessian()

sgpp::base::WrapperScalarFunctionHessian::~WrapperScalarFunctionHessian ( )
inlineoverride

Destructor.

Member Function Documentation

◆ clone()

void sgpp::base::WrapperScalarFunctionHessian::clone ( std::unique_ptr< ScalarFunctionHessian > &  clone) const
inlineoverridevirtual
Parameters
[out]clonepointer to cloned object

Implements sgpp::base::ScalarFunctionHessian.

References clone(), sgpp::base::ScalarFunctionHessian::d, and fHessian.

Referenced by clone().

◆ eval()

double sgpp::base::WrapperScalarFunctionHessian::eval ( const DataVector x,
DataVector gradient,
DataMatrix hessian 
)
inlineoverridevirtual
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})\)

Implements sgpp::base::ScalarFunctionHessian.

References fHessian.

Referenced by python.uq.analysis.asgc.ASGCAnalysis.ASGCAnalysis::estimateDensity().

Member Data Documentation

◆ fHessian

FunctionHessianEvalType sgpp::base::WrapperScalarFunctionHessian::fHessian
protected

function Hessian to be wrapped

Referenced by clone(), and eval().


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