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

#include <ScaledScalarFunction.hpp>

Inheritance diagram for sgpp::base::ScaledScalarFunction:
sgpp::base::ScalarFunction

Public Member Functions

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

Protected Attributes

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

Constructor & Destructor Documentation

◆ ScaledScalarFunction() [1/2]

sgpp::base::ScaledScalarFunction::ScaledScalarFunction ( const ScalarFunction fOrig)
inlineexplicit

◆ ScaledScalarFunction() [2/2]

sgpp::base::ScaledScalarFunction::ScaledScalarFunction ( const ScalarFunction fOrig,
const DataVector lowerBounds,
const DataVector upperBounds,
double  valueFactor 
)
inline

References fOrig.

◆ ~ScaledScalarFunction()

sgpp::base::ScaledScalarFunction::~ScaledScalarFunction ( )
inlineoverride

Member Function Documentation

◆ clone()

void sgpp::base::ScaledScalarFunction::clone ( std::unique_ptr< ScalarFunction > &  clone) const
inlineoverridevirtual

Pure virtual method for cloning the function.

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::ScalarFunction.

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

Referenced by clone().

◆ eval()

double sgpp::base::ScaledScalarFunction::eval ( const DataVector x)
inlineoverridevirtual

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

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

Implements sgpp::base::ScalarFunction.

References sgpp::base::ScalarFunction::d, fOrig, lowerBounds, upperBounds, valueFactor, and xScaled.

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

◆ getLowerBounds()

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

References lowerBounds.

◆ getUpperBounds()

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

References upperBounds.

◆ getValueFactor()

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

References valueFactor.

◆ setLowerBounds()

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

◆ setUpperBounds()

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

◆ setValueFactor()

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

Member Data Documentation

◆ fOrig

std::unique_ptr<ScalarFunction> sgpp::base::ScaledScalarFunction::fOrig
protected

Referenced by clone(), eval(), and ScaledScalarFunction().

◆ lowerBounds

DataVector sgpp::base::ScaledScalarFunction::lowerBounds
protected

◆ upperBounds

DataVector sgpp::base::ScaledScalarFunction::upperBounds
protected

◆ valueFactor

double sgpp::base::ScaledScalarFunction::valueFactor
protected

◆ xScaled

DataVector sgpp::base::ScaledScalarFunction::xScaled
protected

Referenced by eval().


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