SG++
sgpp::optimization::test_problems::AckleyObjective Class Reference

Ackley objective function. More...

#include <Ackley.hpp>

Inheritance diagram for sgpp::optimization::test_problems::AckleyObjective:
sgpp::optimization::test_problems::TestScalarFunction sgpp::optimization::ScalarFunction

Public Member Functions

 AckleyObjective (size_t d)
 Constructor. More...
 
void clone (std::unique_ptr< ScalarFunction > &clone) const override
 
double evalUndisplaced (const base::DataVector &x) override
 
 ~AckleyObjective () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::test_problems::TestScalarFunction
double eval (const base::DataVector &x) override
 Evaluate displaced function. More...
 
const base::DataVectorgetDisplacement () const
 
void setDisplacement (const base::DataVector &displacement)
 
 TestScalarFunction (size_t d)
 Constructor. More...
 
 ~TestScalarFunction () override
 Destructor. More...
 
- Public Member Functions inherited from sgpp::optimization::ScalarFunction
size_t getNumberOfParameters () const
 
 ScalarFunction (size_t d)
 Constructor. More...
 
virtual ~ScalarFunction ()
 Destructor. More...
 

Additional Inherited Members

- Protected Attributes inherited from sgpp::optimization::test_problems::TestScalarFunction
base::DataVector displacement
 displacement vector More...
 
base::DataVector xTmp
 temporary vector for displacing More...
 
- Protected Attributes inherited from sgpp::optimization::ScalarFunction
size_t d
 dimension of the domain More...
 

Detailed Description

Ackley objective function.

Definition:

\[\bar{f}(\bar{\vec{x}}) := 20 + \mathrm{e} - 20 \exp\!\left(-\frac{\norm{\bar{\vec{x}}}_2}{5\sqrt{d}}\right) - \exp\!\left(\frac{1}{d} \sum_{t=1}^d \cos(2\pi \bar{x}_t)\right)\]

Constructor & Destructor Documentation

sgpp::optimization::test_problems::AckleyObjective::AckleyObjective ( size_t  d)
explicit

Constructor.

Parameters
ddimension of the domain

Referenced by clone().

sgpp::optimization::test_problems::AckleyObjective::~AckleyObjective ( )
override

Destructor.

Member Function Documentation

void sgpp::optimization::test_problems::AckleyObjective::clone ( std::unique_ptr< ScalarFunction > &  clone) const
overridevirtual
Parameters
[out]clonepointer to cloned object

Implements sgpp::optimization::ScalarFunction.

References AckleyObjective().

double sgpp::optimization::test_problems::AckleyObjective::evalUndisplaced ( const base::DataVector x)
overridevirtual
Parameters
xpoint \(\vec{x} \in [0, 1]^d\)
Returns
\(f(\vec{x})\)

Implements sgpp::optimization::test_problems::TestScalarFunction.

References sgpp::optimization::ScalarFunction::d, M_E, and M_PI.


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