![]() |
SG++-Doxygen-Documentation
|
Abstract base class for scalar-valued functions \(f\colon [0, 1]^d \to \mathbb{R}\) (e.g., objective functions in optimization). More...
#include <ScalarFunction.hpp>
Public Member Functions | |
virtual void | clone (std::unique_ptr< ScalarFunction > &clone) const =0 |
Pure virtual method for cloning the function. | |
virtual void | eval (const DataMatrix &x, DataVector &value) |
Convenience method for calculating \(f(\vec{x})\) for multiple \(\vec{x}\). | |
virtual double | eval (const DataVector &x)=0 |
Pure virtual method for calculating \(f(\vec{x})\). | |
size_t | getNumberOfParameters () const |
ScalarFunction (size_t d) | |
Constructor. | |
virtual | ~ScalarFunction () |
Destructor. | |
Protected Attributes | |
size_t | d |
dimension of the domain | |
Abstract base class for scalar-valued functions \(f\colon [0, 1]^d \to \mathbb{R}\) (e.g., objective functions in optimization).
|
inlineexplicit |
Constructor.
d | dimension of the domain |
|
inlinevirtual |
Destructor.
|
pure virtual |
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).
[out] | clone | pointer to cloned object |
Implemented in sgpp::optimization::ASInterpolantScalarFunction, sgpp::optimization::test_problems::FloudasObjective, sgpp::optimization::test_problems::G03Objective, sgpp::optimization::test_problems::G04Objective, sgpp::optimization::test_problems::G04SquaredObjective, sgpp::optimization::test_problems::G05Objective, sgpp::optimization::test_problems::G06Objective, sgpp::optimization::test_problems::G08Objective, sgpp::optimization::test_problems::G09Objective, sgpp::optimization::test_problems::G10Objective, sgpp::optimization::test_problems::G11Objective, sgpp::optimization::test_problems::G12Objective, sgpp::optimization::test_problems::G13Objective, sgpp::optimization::test_problems::SimionescuObjective, sgpp::optimization::test_problems::SolandObjective, sgpp::optimization::test_problems::AbsoluteValueObjective, sgpp::optimization::test_problems::AckleyObjective, sgpp::optimization::test_problems::Alpine02Objective, sgpp::optimization::test_problems::BealeObjective, sgpp::optimization::test_problems::Branin01Objective, sgpp::optimization::test_problems::Branin02Objective, sgpp::optimization::test_problems::BubbleWrapObjective, sgpp::optimization::test_problems::EasomYangObjective, sgpp::optimization::test_problems::EggholderObjective, sgpp::optimization::test_problems::GoldsteinPriceObjective, sgpp::optimization::test_problems::GriewankObjective, sgpp::optimization::test_problems::Hartman3Objective, sgpp::optimization::test_problems::Hartman6Objective, sgpp::optimization::test_problems::HimmelblauObjective, sgpp::optimization::test_problems::HoelderTableObjective, sgpp::optimization::test_problems::IncreasingPowerObjective, sgpp::optimization::test_problems::MichalewiczObjective, sgpp::optimization::test_problems::MladineoObjective, sgpp::optimization::test_problems::PermObjective, sgpp::optimization::test_problems::RastriginObjective, sgpp::optimization::test_problems::RosenbrockObjective, sgpp::optimization::test_problems::Schwefel06Objective, sgpp::optimization::test_problems::Schwefel22Objective, sgpp::optimization::test_problems::Schwefel26Objective, sgpp::optimization::test_problems::SHCBObjective, sgpp::optimization::test_problems::SphereObjective, sgpp::optimization::test_problems::TremblingParabolaObjective, sgpp::base::ComponentScalarFunction, sgpp::base::InterpolantScalarFunction, sgpp::base::ScaledScalarFunction, sgpp::base::WrapperScalarFunction, and sgpp::datadriven::KDEMaximumLikelihoodCrossValidation.
Referenced by sgpp::optimization::IterativeGridGenerator::evalFunction(), and sgpp::optimization::optimizer::DifferentialEvolution::optimize().
|
inlinevirtual |
Convenience method for calculating \(f(\vec{x})\) for multiple \(\vec{x}\).
x | matrix \(\vec{x} \in [0, 1]^{N \times d}\) of evaluation points (row-wise) | |
[out] | value | \((f(\vec{x}_k))_k\) where \(\vec{x}_k\) is the \(k\)-th row of \(x\) |
References d, eval(), sgpp::base::DataMatrix::getNrows(), and sgpp::base::DataMatrix::getRow().
Referenced by python.uq.analysis.asgc.ASGCAnalysis.ASGCAnalysis::estimateDensity().
|
pure virtual |
Pure virtual method for calculating \(f(\vec{x})\).
x | evaluation point \(\vec{x} \in [0, 1]^d\) |
Implemented in sgpp::optimization::ASInterpolantScalarFunction, sgpp::optimization::test_problems::TestScalarFunction, sgpp::base::ComponentScalarFunction, sgpp::base::InterpolantScalarFunction, sgpp::base::ScaledScalarFunction, sgpp::base::WrapperScalarFunction, and sgpp::datadriven::KDEMaximumLikelihoodCrossValidation.
Referenced by sgpp::datadriven::OperationMakePositiveInterpolateFunction::computeHierarchicalCoefficients(), python.uq.analysis.asgc.ASGCAnalysis.ASGCAnalysis::estimateDensity(), eval(), sgpp::base::ComponentScalarFunction::eval(), sgpp::optimization::IterativeGridGenerator::evalFunction(), sgpp::optimization::IterativeGridGeneratorSOO::generate(), and sgpp::optimization::optimizer::DifferentialEvolution::optimize().
|
inline |
References d.
Referenced by sgpp::optimization::IterativeGridGenerator::evalFunction(), sgpp::optimization::IterativeGridGeneratorFuzzyRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorRitterNovak::generate(), sgpp::optimization::IterativeGridGeneratorSOO::generate(), and sgpp::optimization::IterativeGridGeneratorLinearSurplus::IterativeGridGeneratorLinearSurplus().
|
protected |
dimension of the domain
Referenced by sgpp::base::WrapperScalarFunction::clone(), sgpp::optimization::test_problems::TestScalarFunction::eval(), eval(), sgpp::base::InterpolantScalarFunction::eval(), sgpp::base::ScaledScalarFunction::eval(), sgpp::optimization::test_problems::G03Objective::evalUndisplaced(), sgpp::optimization::test_problems::AbsoluteValueObjective::evalUndisplaced(), sgpp::optimization::test_problems::AckleyObjective::evalUndisplaced(), sgpp::optimization::test_problems::Alpine02Objective::evalUndisplaced(), sgpp::optimization::test_problems::BubbleWrapObjective::evalUndisplaced(), sgpp::optimization::test_problems::EasomYangObjective::evalUndisplaced(), sgpp::optimization::test_problems::GriewankObjective::evalUndisplaced(), sgpp::optimization::test_problems::IncreasingPowerObjective::evalUndisplaced(), sgpp::optimization::test_problems::PermObjective::evalUndisplaced(), sgpp::optimization::test_problems::RastriginObjective::evalUndisplaced(), sgpp::optimization::test_problems::RosenbrockObjective::evalUndisplaced(), sgpp::optimization::test_problems::Schwefel22Objective::evalUndisplaced(), sgpp::optimization::test_problems::Schwefel26Objective::evalUndisplaced(), sgpp::optimization::test_problems::SphereObjective::evalUndisplaced(), sgpp::optimization::test_problems::TremblingParabolaObjective::evalUndisplaced(), and getNumberOfParameters().