golib
0.5
|
Function interface for Newton type optimisation. More...
#include <goopt.h>
Public Types | |
typedef vector_type::value_type | value_type |
Value of the matrix and vector types matrix_type and vector_type. | |
Public Member Functions | |
virtual value_type | operator() (const vector_type &x)=0 |
virtual void | grad (vector_type &x, vector_type &ret) |
Calculate the gradient of f at x. More... | |
virtual void | hessian (vector_type &x, matrix_type &ret) |
Calculate the Hessian of f at x. More... | |
Protected Member Functions | |
OptFunction (double eps=0.01) | |
Constructor. More... | |
Function interface for Newton type optimisation.
Provides function evaluation, gradient, and Hessian computation.
|
inlineexplicitprotected |
Constructor.
eps | Epsilon, used in numerically calculating the gradient and Hessian. |
|
inlinevirtual |
Calculate the gradient of f at x.
Does a numerical approximation with forward differences. Re-implement for specialisations.
x | Point at which to calculate the gradient |
ret | Contains ![]() |
Reimplemented in goMath::BarrierOptFunctionPhase1< matrix_type, vector_type >, and goMath::BarrierOptFunction< matrix_type, vector_type >.
|
inlinevirtual |
Calculate the Hessian of f at x.
Does a numerical approximation with forward differences. Re-implement for specialisations.
x | Point at which to calculate the Hessian |
ret | Contains ![]() |
Reimplemented in goMath::BarrierOptFunctionPhase1< matrix_type, vector_type >.