Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
MathUtils::Ackley Class Reference

Ackley function functor (for testing global optimization). f(x) = -a*exp(-b*sqrt(sum(x[i]^2)/n)) - exp(sum(cos(c*x[i]))/n) + a + e Default: a = 20, b = 0.2, c = 2*pi Global minimum at origin with f = 0. More...

#include <MathUtils_FunctorVector.hxx>

Public Member Functions

 Ackley (double theA=20.0, double theB=0.2, double theC=2.0 *3.14159265358979323846)
 Constructor with parameters.
 
bool Value (const math_Vector &theX, double &theY) const
 Evaluates the Ackley function.
 

Detailed Description

Ackley function functor (for testing global optimization). f(x) = -a*exp(-b*sqrt(sum(x[i]^2)/n)) - exp(sum(cos(c*x[i]))/n) + a + e Default: a = 20, b = 0.2, c = 2*pi Global minimum at origin with f = 0.

Constructor & Destructor Documentation

◆ Ackley()

MathUtils::Ackley::Ackley ( double theA = 20.0,
double theB = 0.2,
double theC = 2.0 * 3.14159265358979323846 )
inline

Constructor with parameters.

Parameters
theAparameter a (default 20.0)
theBparameter b (default 0.2)
theCparameter c (default 2*pi)

Member Function Documentation

◆ Value()

bool MathUtils::Ackley::Value ( const math_Vector & theX,
double & theY ) const
inline

Evaluates the Ackley function.

Parameters
[in]theXinput vector
[out]theYfunction value
Returns
true (always succeeds)

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