SG++-Doxygen-Documentation
|
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\) (e.g., gradients of objective functions in optimization). More...
#include <ScalarFunctionGradient.hpp>
Public Member Functions | |
virtual void | clone (std::unique_ptr< ScalarFunctionGradient > &clone) const =0 |
Pure virtual method for cloning the gradient. More... | |
virtual double | eval (const base::DataVector &x, base::DataVector &gradient)=0 |
Pure virtual method for calculating \(f(\vec{x})\) together with \(\nabla f(\vec{x})\). More... | |
size_t | getNumberOfParameters () const |
ScalarFunctionGradient (size_t d) | |
Constructor. More... | |
virtual | ~ScalarFunctionGradient () |
Destructor. More... | |
Protected Attributes | |
size_t | d |
dimension of the domain More... | |
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\) (e.g., gradients of objective functions in optimization).
|
inlineexplicit |
Constructor.
d | dimension of the domain |
|
inlinevirtual |
Destructor.
References eval().
|
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).
[out] | clone | pointer to cloned object |
Implemented in sgpp::optimization::ComponentScalarFunctionGradient, sgpp::optimization::InterpolantScalarFunctionGradient, and sgpp::optimization::WrapperScalarFunctionGradient.
Referenced by sgpp::optimization::optimizer::AdaptiveGradientDescent::AdaptiveGradientDescent(), sgpp::optimization::optimizer::AugmentedLagrangian::AugmentedLagrangian(), sgpp::optimization::optimizer::BFGS::BFGS(), getNumberOfParameters(), sgpp::optimization::optimizer::GradientDescent::GradientDescent(), sgpp::optimization::optimizer::LogBarrier::LogBarrier(), sgpp::optimization::optimizer::NLCG::NLCG(), sgpp::optimization::optimizer::Rprop::Rprop(), and sgpp::optimization::optimizer::SquaredPenalty::SquaredPenalty().
|
pure virtual |
Pure virtual method for calculating \(f(\vec{x})\) together with \(\nabla f(\vec{x})\).
x | evaluation point \(\vec{x} \in [0, 1]^d\) | |
[out] | gradient | gradient \(\nabla f(\vec{x}) \in \mathbb{R}^d\) |
Implemented in sgpp::optimization::ComponentScalarFunctionGradient, sgpp::optimization::InterpolantScalarFunctionGradient, and sgpp::optimization::WrapperScalarFunctionGradient.
Referenced by sgpp::optimization::ComponentScalarFunctionGradient::eval(), and ~ScalarFunctionGradient().
|
inline |
|
protected |
dimension of the domain
Referenced by sgpp::optimization::WrapperScalarFunctionGradient::clone(), sgpp::optimization::InterpolantScalarFunctionGradient::eval(), and getNumberOfParameters().