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

#include <ScaledScalarFunctionGradient.hpp>

Inheritance diagram for sgpp::base::ScaledScalarFunctionGradient:
sgpp::base::ScalarFunctionGradient

Public Member Functions

void clone (std::unique_ptr< ScalarFunctionGradient > &clone) const override
 Pure virtual method for cloning the gradient.
 
double eval (const DataVector &x, DataVector &gradient) override
 Pure virtual method for calculating \(f(\vec{x})\) together with \(\nabla f(\vec{x})\).
 
const DataVectorgetLowerBounds () const
 
const DataVectorgetUpperBounds () const
 
double getValueFactor (double valueFactor) const
 
 ScaledScalarFunctionGradient (const ScalarFunctionGradient &fGradientOrig)
 
 ScaledScalarFunctionGradient (const ScalarFunctionGradient &fGradientOrig, const DataVector &lowerBounds, const DataVector &upperBounds, double valueFactor)
 
void setLowerBounds (const DataVector &lowerBounds)
 
void setUpperBounds (const DataVector &upperBounds)
 
void setValueFactor (double valueFactor)
 
 ~ScaledScalarFunctionGradient () override
 
- Public Member Functions inherited from sgpp::base::ScalarFunctionGradient
virtual void eval (const DataMatrix &x, DataVector &value, DataMatrix &gradient)
 Convenience method for calculating \(f(\vec{x})\) together with \(\nabla f(\vec{x})\) for multiple \(\vec{x}\).
 
size_t getNumberOfParameters () const
 
 ScalarFunctionGradient (size_t d)
 Constructor.
 
virtual ~ScalarFunctionGradient ()
 Destructor.
 

Protected Attributes

std::unique_ptr< ScalarFunctionGradientfGradientOrig
 
DataVector lowerBounds
 
DataVector upperBounds
 
double valueFactor
 
DataVector xScaled
 
- Protected Attributes inherited from sgpp::base::ScalarFunctionGradient
size_t d
 dimension of the domain
 

Constructor & Destructor Documentation

◆ ScaledScalarFunctionGradient() [1/2]

sgpp::base::ScaledScalarFunctionGradient::ScaledScalarFunctionGradient ( const ScalarFunctionGradient fGradientOrig)
inlineexplicit

◆ ScaledScalarFunctionGradient() [2/2]

sgpp::base::ScaledScalarFunctionGradient::ScaledScalarFunctionGradient ( const ScalarFunctionGradient fGradientOrig,
const DataVector lowerBounds,
const DataVector upperBounds,
double  valueFactor 
)
inline

References fGradientOrig.

◆ ~ScaledScalarFunctionGradient()

sgpp::base::ScaledScalarFunctionGradient::~ScaledScalarFunctionGradient ( )
inlineoverride

Member Function Documentation

◆ clone()

void sgpp::base::ScaledScalarFunctionGradient::clone ( std::unique_ptr< ScalarFunctionGradient > &  clone) const
inlineoverridevirtual

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

Implements sgpp::base::ScalarFunctionGradient.

References clone(), fGradientOrig, lowerBounds, upperBounds, and valueFactor.

Referenced by clone().

◆ eval()

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

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

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::base::ScalarFunctionGradient.

References sgpp::base::ScalarFunctionGradient::d, fGradientOrig, lowerBounds, upperBounds, valueFactor, and xScaled.

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

◆ getLowerBounds()

const DataVector & sgpp::base::ScaledScalarFunctionGradient::getLowerBounds ( ) const
inline

References lowerBounds.

◆ getUpperBounds()

const DataVector & sgpp::base::ScaledScalarFunctionGradient::getUpperBounds ( ) const
inline

References upperBounds.

◆ getValueFactor()

double sgpp::base::ScaledScalarFunctionGradient::getValueFactor ( double  valueFactor) const
inline

References valueFactor.

◆ setLowerBounds()

void sgpp::base::ScaledScalarFunctionGradient::setLowerBounds ( const DataVector lowerBounds)
inline

◆ setUpperBounds()

void sgpp::base::ScaledScalarFunctionGradient::setUpperBounds ( const DataVector upperBounds)
inline

◆ setValueFactor()

void sgpp::base::ScaledScalarFunctionGradient::setValueFactor ( double  valueFactor)
inline

Member Data Documentation

◆ fGradientOrig

std::unique_ptr<ScalarFunctionGradient> sgpp::base::ScaledScalarFunctionGradient::fGradientOrig
protected

◆ lowerBounds

DataVector sgpp::base::ScaledScalarFunctionGradient::lowerBounds
protected

◆ upperBounds

DataVector sgpp::base::ScaledScalarFunctionGradient::upperBounds
protected

◆ valueFactor

double sgpp::base::ScaledScalarFunctionGradient::valueFactor
protected

◆ xScaled

DataVector sgpp::base::ScaledScalarFunctionGradient::xScaled
protected

Referenced by eval().


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