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

Booth function functor (for testing optimization). f(x,y) = (x + 2y - 7)^2 + (2x + y - 5)^2 Global minimum at (1, 3) with f = 0. More...

#include <MathUtils_FunctorVector.hxx>

Public Member Functions

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

Detailed Description

Booth function functor (for testing optimization). f(x,y) = (x + 2y - 7)^2 + (2x + y - 5)^2 Global minimum at (1, 3) with f = 0.

Usage:

aStart(1) = 0.0; aStart(2) = 0.0;
// Should converge to (1, 3)
Booth function functor (for testing optimization). f(x,y) = (x + 2y - 7)^2 + (2x + y - 5)^2 Global mi...
Definition MathUtils_FunctorVector.hxx:373
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
VectorResult BFGS(Function &theFunc, const math_Vector &theStartingPoint, const Config &theConfig=Config())
BFGS (Broyden-Fletcher-Goldfarb-Shanno) quasi-Newton method. One of the most effective algorithms for...
Definition MathOpt_BFGS.hxx:58

Member Function Documentation

◆ Gradient()

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

Evaluates the gradient of the Booth function.

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

◆ Value()

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

Evaluates the Booth function.

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

◆ Values()

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