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

Rastrigin function functor (for testing global optimization). f(x) = A*n + sum(x[i]^2 - A*cos(2*pi*x[i])) for all i Default: A = 10 Global minimum at origin with f = 0. Highly multimodal - challenging for local optimizers. More...

#include <MathUtils_FunctorVector.hxx>

Public Member Functions

 Rastrigin (double theA=10.0)
 Constructor with parameter.
 
bool Value (const math_Vector &theX, double &theY) const
 Evaluates the Rastrigin function.
 
bool Gradient (const math_Vector &theX, math_Vector &theG) const
 Evaluates the gradient of the Rastrigin function.
 
bool Values (const math_Vector &theX, double &theY, math_Vector &theG) const
 Evaluates both value and gradient.
 

Detailed Description

Rastrigin function functor (for testing global optimization). f(x) = A*n + sum(x[i]^2 - A*cos(2*pi*x[i])) for all i Default: A = 10 Global minimum at origin with f = 0. Highly multimodal - challenging for local optimizers.

Constructor & Destructor Documentation

◆ Rastrigin()

MathUtils::Rastrigin::Rastrigin ( double theA = 10.0)
inlineexplicit

Constructor with parameter.

Parameters
theAparameter A (default 10.0)

Member Function Documentation

◆ Gradient()

bool MathUtils::Rastrigin::Gradient ( const math_Vector & theX,
math_Vector & theG ) const
inline

Evaluates the gradient of the Rastrigin function.

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

◆ Value()

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

Evaluates the Rastrigin function.

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

◆ Values()

bool MathUtils::Rastrigin::Values ( const math_Vector & theX,
double & theY,
math_Vector & theG ) const
inline

Evaluates both value and gradient.

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

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