Quadratic form functor: f(x) = x^T A x + b^T x + c. Commonly used for testing optimization algorithms.
More...
#include <MathUtils_FunctorVector.hxx>
Quadratic form functor: f(x) = x^T A x + b^T x + c. Commonly used for testing optimization algorithms.
Usage:
A(1,1) = 2.0; A(1,2) = 0.0;
A(2,1) = 0.0; A(2,2) = 2.0;
b(1) = -4.0;
b(2) = -4.0;
GLboolean GLboolean GLboolean b
Definition OpenGl_glext.h:1455
STL input iterator that wraps an OCCT More()/Next() iterator.
Definition NCollection_ForwardRange.hxx:142
This class implements the real matrix abstract data type. Matrixes can have an arbitrary range which ...
Definition math_Matrix.hxx:75
◆ QuadraticForm()
Constructor from matrix, vector, and constant.
- Parameters
-
| theA | quadratic coefficient matrix (must be square) |
| theB | linear coefficient vector |
| theC | constant term |
◆ Gradient()
Evaluates the gradient: g = 2*A*x + b.
- Parameters
-
| [in] | theX | input vector |
| [out] | theG | gradient vector |
- Returns
- true if evaluation succeeded
◆ Value()
Evaluates the quadratic form f(x) = x^T A x + b^T x + c.
- Parameters
-
| [in] | theX | input vector |
| [out] | theY | function value |
- Returns
- true if evaluation succeeded
◆ Values()
Evaluates both value and gradient.
- 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: