Lambda wrapper for N-D objective functions with gradient. Wraps a lambda/callable into a functor with Value() and Gradient() methods.
More...
#include <MathUtils_FunctorVector.hxx>
Lambda wrapper for N-D objective functions with gradient. Wraps a lambda/callable into a functor with Value() and Gradient() methods.
Usage:
y =
x(1)*
x(1) +
x(2)*
x(2);
return true;
},
return true;
});
GLint GLint GLint GLint GLint x
Definition OpenGl_glext.h:125
GLboolean GLboolean g
Definition OpenGl_glext.h:1454
VectorLambdaWithGradient(ValueLambda theValueLambda, GradLambda theGradLambda)
Constructor from value and gradient lambdas.
Definition MathUtils_FunctorVector.hxx:95
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
- Template Parameters
-
| ValueLambda | callable for value: bool(const math_Vector&, double&) |
| GradLambda | callable for gradient: bool(const math_Vector&, math_Vector&) |
◆ VectorLambdaWithGradient()
Constructor from value and gradient lambdas.
- Parameters
-
| theValueLambda | callable for value evaluation |
| theGradLambda | callable for gradient evaluation |
◆ Gradient()
Evaluates the gradient at theX.
- Parameters
-
| [in] | theX | input vector |
| [out] | theG | gradient vector |
- Returns
- true if evaluation succeeded
◆ Value()
Evaluates the function value at theX.
- Parameters
-
| [in] | theX | input vector |
| [out] | theY | function value f(theX) |
- Returns
- true if evaluation succeeded
◆ Values()
Evaluates both value and gradient at theX.
- Parameters
-
| [in] | theX | input vector |
| [out] | theY | function value |
| [out] | theG | gradient vector |
- Returns
- true if evaluation succeeded
The documentation for this class was generated from the following file: