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

Himmelblau function functor (for testing optimization). f(x,y) = (x^2 + y - 11)^2 + (x + y^2 - 7)^2 Has four local minima, all with f = 0: (3.0, 2.0), (-2.805118, 3.131312), (-3.779310, -3.283186), (3.584428, -1.848126) More...

#include <MathUtils_FunctorVector.hxx>

Public Member Functions

bool Value (const math_Vector &theX, double &theY) const
 Evaluates the Himmelblau function.
 
bool Gradient (const math_Vector &theX, math_Vector &theG) const
 Evaluates the gradient of the Himmelblau function.
 
bool Values (const math_Vector &theX, double &theY, math_Vector &theG) const
 Evaluates both value and gradient.
 

Detailed Description

Himmelblau function functor (for testing optimization). f(x,y) = (x^2 + y - 11)^2 + (x + y^2 - 7)^2 Has four local minima, all with f = 0: (3.0, 2.0), (-2.805118, 3.131312), (-3.779310, -3.283186), (3.584428, -1.848126)

Member Function Documentation

◆ Gradient()

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

Evaluates the gradient of the Himmelblau function.

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

◆ Value()

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

Evaluates the Himmelblau function.

Parameters
[in]theXinput vector (must have length 2)
[out]theYfunction value
Returns
true (always succeeds)

◆ Values()

bool MathUtils::Himmelblau::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: