SG++-Doxygen-Documentation
sgpp::optimization::ScalarFunction Class Referenceabstract

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>

Inheritance diagram for sgpp::optimization::ScalarFunction:
sgpp::datadriven::KDEMaximumLikelihoodCrossValidation sgpp::optimization::ComponentScalarFunction sgpp::optimization::InterpolantScalarFunction sgpp::optimization::test_problems::TestScalarFunction sgpp::optimization::WrapperScalarFunction sgpp::optimization::test_problems::AbsoluteValueObjective sgpp::optimization::test_problems::AckleyObjective sgpp::optimization::test_problems::BealeObjective sgpp::optimization::test_problems::BraninObjective sgpp::optimization::test_problems::BubbleWrapObjective sgpp::optimization::test_problems::EasomYangObjective sgpp::optimization::test_problems::EggholderObjective sgpp::optimization::test_problems::FloudasObjective sgpp::optimization::test_problems::G03Objective sgpp::optimization::test_problems::G04Objective 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::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::SchwefelObjective sgpp::optimization::test_problems::SHCBObjective sgpp::optimization::test_problems::SimionescuObjective sgpp::optimization::test_problems::SolandObjective sgpp::optimization::test_problems::SphereObjective sgpp::optimization::test_problems::TremblingParabolaObjective

Public Member Functions

virtual void clone (std::unique_ptr< ScalarFunction > &clone) const =0
 Pure virtual method for cloning the function. More...
 
virtual double eval (const base::DataVector &x)=0
 Pure virtual method for calculating \(f(\vec{x})\). More...
 
size_t getNumberOfParameters () const
 
 ScalarFunction (size_t d)
 Constructor. More...
 
virtual ~ScalarFunction ()
 Destructor. More...
 

Protected Attributes

size_t d
 dimension of the domain More...
 

Detailed Description

Abstract base class for scalar-valued functions \(f\colon [0, 1]^d \to \mathbb{R}\) (e.g., objective functions in optimization).

Constructor & Destructor Documentation

◆ ScalarFunction()

sgpp::optimization::ScalarFunction::ScalarFunction ( size_t  d)
inlineexplicit

Constructor.

Parameters
ddimension of the domain

◆ ~ScalarFunction()

virtual sgpp::optimization::ScalarFunction::~ScalarFunction ( )
inlinevirtual

Destructor.

References eval().

Member Function Documentation

◆ clone()

virtual void sgpp::optimization::ScalarFunction::clone ( std::unique_ptr< ScalarFunction > &  clone) const
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).

Parameters
[out]clonepointer to cloned object

Implemented in sgpp::datadriven::KDEMaximumLikelihoodCrossValidation, sgpp::optimization::ComponentScalarFunction, sgpp::optimization::InterpolantScalarFunction, sgpp::optimization::test_problems::Hartman3Objective, sgpp::optimization::test_problems::Hartman6Objective, sgpp::optimization::test_problems::TremblingParabolaObjective, sgpp::optimization::test_problems::EasomYangObjective, sgpp::optimization::test_problems::EggholderObjective, sgpp::optimization::test_problems::GoldsteinPriceObjective, sgpp::optimization::test_problems::GriewankObjective, sgpp::optimization::WrapperScalarFunction, sgpp::optimization::test_problems::AckleyObjective, sgpp::optimization::test_problems::BraninObjective, sgpp::optimization::test_problems::BubbleWrapObjective, sgpp::optimization::test_problems::IncreasingPowerObjective, sgpp::optimization::test_problems::PermObjective, sgpp::optimization::test_problems::RastriginObjective, sgpp::optimization::test_problems::RosenbrockObjective, sgpp::optimization::test_problems::G03Objective, sgpp::optimization::test_problems::G09Objective, sgpp::optimization::test_problems::BealeObjective, sgpp::optimization::test_problems::HoelderTableObjective, sgpp::optimization::test_problems::MladineoObjective, sgpp::optimization::test_problems::SchwefelObjective, sgpp::optimization::test_problems::SHCBObjective, sgpp::optimization::test_problems::G04Objective, sgpp::optimization::test_problems::G05Objective, sgpp::optimization::test_problems::G08Objective, sgpp::optimization::test_problems::AbsoluteValueObjective, sgpp::optimization::test_problems::MichalewiczObjective, sgpp::optimization::test_problems::SphereObjective, sgpp::optimization::test_problems::FloudasObjective, sgpp::optimization::test_problems::G06Objective, 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, and sgpp::optimization::test_problems::HimmelblauObjective.

Referenced by sgpp::optimization::IterativeGridGenerator::evalFunction(), getNumberOfParameters(), and sgpp::optimization::optimizer::UnconstrainedOptimizer::UnconstrainedOptimizer().

◆ eval()

◆ getNumberOfParameters()

Member Data Documentation

◆ d


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