SG++-Doxygen-Documentation
sgpp::optimization::InterpolantScalarFunctionGradient Class Reference

Sparse grid interpolant gradient of a scalar-valued function. More...

#include <InterpolantScalarFunctionGradient.hpp>

Inheritance diagram for sgpp::optimization::InterpolantScalarFunctionGradient:
sgpp::optimization::ScalarFunctionGradient

Public Member Functions

void clone (std::unique_ptr< ScalarFunctionGradient > &clone) const override
 
double eval (const base::DataVector &x, base::DataVector &gradient) override
 Evaluation of the function and its gradient. More...
 
const base::DataVectorgetAlpha () const
 
 InterpolantScalarFunctionGradient (base::Grid &grid, const base::DataVector &alpha)
 Constructor. More...
 
void setAlpha (const base::DataVector &alpha)
 
 ~InterpolantScalarFunctionGradient () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::ScalarFunctionGradient
size_t getNumberOfParameters () const
 
 ScalarFunctionGradient (size_t d)
 Constructor. More...
 
virtual ~ScalarFunctionGradient ()
 Destructor. More...
 

Protected Attributes

base::DataVector alpha
 coefficient vector More...
 
base::Gridgrid
 sparse grid More...
 
std::unique_ptr< base::OperationEvalGradientopEvalGradient
 pointer to evaluation operation More...
 
- Protected Attributes inherited from sgpp::optimization::ScalarFunctionGradient
size_t d
 dimension of the domain More...
 

Detailed Description

Sparse grid interpolant gradient of a scalar-valued function.

See also
InterpolantScalarFunction

Constructor & Destructor Documentation

◆ InterpolantScalarFunctionGradient()

sgpp::optimization::InterpolantScalarFunctionGradient::InterpolantScalarFunctionGradient ( base::Grid grid,
const base::DataVector alpha 
)
inline

Constructor.

Do not destruct the grid before the InterpolantScalarFunctionGradient object!

Parameters
gridsparse grid
alphacoefficient vector

Referenced by clone().

◆ ~InterpolantScalarFunctionGradient()

sgpp::optimization::InterpolantScalarFunctionGradient::~InterpolantScalarFunctionGradient ( )
inlineoverride

Destructor.

Member Function Documentation

◆ clone()

void sgpp::optimization::InterpolantScalarFunctionGradient::clone ( std::unique_ptr< ScalarFunctionGradient > &  clone) const
inlineoverridevirtual
Parameters
[out]clonepointer to cloned object

Implements sgpp::optimization::ScalarFunctionGradient.

References alpha, grid, and InterpolantScalarFunctionGradient().

◆ eval()

double sgpp::optimization::InterpolantScalarFunctionGradient::eval ( const base::DataVector x,
base::DataVector gradient 
)
inlineoverridevirtual

Evaluation of the function and its gradient.

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

Implements sgpp::optimization::ScalarFunctionGradient.

References alpha, sgpp::optimization::ScalarFunctionGradient::d, and opEvalGradient.

◆ getAlpha()

const base::DataVector& sgpp::optimization::InterpolantScalarFunctionGradient::getAlpha ( ) const
inline
Returns
coefficient vector

References alpha.

◆ setAlpha()

void sgpp::optimization::InterpolantScalarFunctionGradient::setAlpha ( const base::DataVector alpha)
inline
Parameters
alphacoefficient vector

References alpha.

Member Data Documentation

◆ alpha

base::DataVector sgpp::optimization::InterpolantScalarFunctionGradient::alpha
protected

◆ grid

◆ opEvalGradient

std::unique_ptr<base::OperationEvalGradient> sgpp::optimization::InterpolantScalarFunctionGradient::opEvalGradient
protected

pointer to evaluation operation

Referenced by eval().


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