Sphere function functor (for testing optimization). f(x) = sum(x[i]^2) for all i. Global minimum at origin with f = 0.
More...
#include <MathUtils_FunctorVector.hxx>
Sphere function functor (for testing optimization). f(x) = sum(x[i]^2) for all i. Global minimum at origin with f = 0.
Usage:
aStart.Init(1.0);
Sphere function functor (for testing optimization). f(x) = sum(x[i]^2) for all i. Global minimum at o...
Definition MathUtils_FunctorVector.hxx:320
math_VectorBase< double > math_Vector
Definition math_Recipes.hxx:25
VectorResult Powell(Function &theFunc, const math_Vector &theStartingPoint, const Config &theConfig=Config())
Powell's conjugate direction method for N-dimensional minimization. A gradient-free optimization algo...
Definition MathOpt_Powell.hxx:52
◆ Gradient()
Evaluates the gradient of the sphere function.
- Parameters
-
| [in] | theX | input vector |
| [out] | theG | gradient vector |
- Returns
- true (always succeeds)
◆ Value()
| bool MathUtils::Sphere::Value |
( |
const math_Vector & | theX, |
|
|
double & | theY ) const |
|
inline |
Evaluates the sphere function.
- Parameters
-
| [in] | theX | input vector |
| [out] | theY | function value |
- Returns
- true (always succeeds)
◆ Values()
Evaluates both value and gradient.
- Parameters
-
| [in] | theX | input vector |
| [out] | theY | function value |
| [out] | theG | gradient vector |
- Returns
- true (always succeeds)
The documentation for this class was generated from the following file: