Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Namespaces | Functions
MathUtils_FunctorVector.hxx File Reference

Non-virtual functor classes for N-dimensional (vector) functions. More...

#include <math_Vector.hxx>
#include <math_Matrix.hxx>
#include <cmath>
#include <utility>

Data Structures

class  MathUtils::VectorLambda< Lambda >
 Lambda wrapper for N-D objective functions (value only). Wraps a lambda/callable into a functor with Value() method. More...
 
class  MathUtils::VectorLambdaWithGradient< ValueLambda, GradLambda >
 Lambda wrapper for N-D objective functions with gradient. Wraps a lambda/callable into a functor with Value() and Gradient() methods. More...
 
class  MathUtils::QuadraticForm
 Quadratic form functor: f(x) = x^T A x + b^T x + c. Commonly used for testing optimization algorithms. More...
 
class  MathUtils::Rosenbrock
 Rosenbrock function functor (for testing optimization). f(x,y) = (a - x)^2 + b*(y - x^2)^2 Default: a = 1, b = 100 Global minimum at (a, a^2) = (1, 1) with f = 0. More...
 
class  MathUtils::Sphere
 Sphere function functor (for testing optimization). f(x) = sum(x[i]^2) for all i. Global minimum at origin with f = 0. More...
 
class  MathUtils::Booth
 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...
 
class  MathUtils::Beale
 Beale function functor (for testing optimization). f(x,y) = (1.5 - x + xy)^2 + (2.25 - x + xy^2)^2 + (2.625 - x + xy^3)^2 Global minimum at (3, 0.5) with f = 0. More...
 
class  MathUtils::Himmelblau
 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...
 
class  MathUtils::Rastrigin
 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...
 
class  MathUtils::Ackley
 Ackley function functor (for testing global optimization). f(x) = -a*exp(-b*sqrt(sum(x[i]^2)/n)) - exp(sum(cos(c*x[i]))/n) + a + e Default: a = 20, b = 0.2, c = 2*pi Global minimum at origin with f = 0. More...
 
class  MathUtils::LinearResidual
 Linear system residual functor: f(x) = ||Ax - b||^2. Useful for solving overdetermined linear systems via optimization. More...
 
class  MathUtils::SystemLambda< Lambda >
 Nonlinear system functor: F(x) = [f1(x), f2(x), ..., fn(x)]. Lambda wrapper for systems of nonlinear equations. More...
 

Namespaces

namespace  MathUtils
 Modern math solver types and result structures.
 

Functions

template<typename Lambda >
VectorLambda< LambdaMathUtils::MakeVector (Lambda theLambda)
 Helper function to create VectorLambda with type deduction.
 
template<typename ValueLambda , typename GradLambda >
VectorLambdaWithGradient< ValueLambda, GradLambdaMathUtils::MakeVectorWithGradient (ValueLambda theValueLambda, GradLambda theGradLambda)
 Helper function to create VectorLambdaWithGradient with type deduction.
 
template<typename Lambda >
SystemLambda< LambdaMathUtils::MakeSystem (Lambda theLambda, int theNbEquations)
 Helper function to create SystemLambda with type deduction.
 

Detailed Description

Non-virtual functor classes for N-dimensional (vector) functions.

Provides ready-to-use functor classes that work with the template-based math API (MathOpt::Powell, MathOpt::BFGS, MathSys::Newton) without virtual dispatch overhead.