KrisLibrary
1.0.0
|
A function from R^n to R. More...
#include <function.h>
Public Member Functions | |
virtual std::string | Label () const |
virtual std::string | VariableLabel (int i) const |
virtual Real | operator() (const Vector &x) |
virtual void | PreEval (const Vector &x) |
virtual Real | Eval (const Vector &x)=0 |
virtual void | Gradient (const Vector &x, Vector &grad) |
virtual Real | Gradient_i (const Vector &x, int i) |
virtual Real | DirectionalDeriv (const Vector &x, const Vector &h) |
virtual void | Hessian (const Vector &x, Matrix &H) |
virtual Real | Hessian_ij (const Vector &x, int i, int j) |
virtual Real | DirectionalDeriv2 (const Vector &x, const Vector &h) |
A function from R^n to R.
Takes a vector as input and returns a real value. Subclasses will overload Eval(), and optionally the derivative evaluation methods.
Follows the same calling methodology as RealFunction, that is, PreEval(x) must be called before Eval(x) or any derivative functions.
Gradient_i() returns the ith component of the gradient vector. Hessian_ij() returns the (i,j)th component of the hessian matrix. DirectionalDeriv() returns the derivative in the direction h. DirectionalDeriv2() returns the 2nd derivative in the direction h.