TwiceDifferentiableScalarField
core/OPT/ScalarField.h Extends: DifferentiableScalarField
Template class used to represent a scalar field whose hessian function is known analitically at every point.
template <unsigned int N>
class TwiceDifferentiableScalarField : public DifferentiableScalarField<N> { ... };
Methods
TwiceDifferentiableScalarField(std::function<double(SVector<N>)> f_,
std::function<SVector<N>(SVector<N>)> df_,
std::function<SMatrix<N>(SVector<N>)> ddf_)
Constructor
Args | Description |
---|---|
std::function<double(SVector<N>)> f_ |
An std::function implementing the analytical expression of the field taking an N dimensional point in input and returning a double in output |
std::function<SVector<N>(SVector<N>)> df_ |
An std::function implementing the analytical expression of the vector field taking an N dimensional point in input and returning an N dimensional point in output representing the gradient expression |
std::function<SMatrix<N>(SVector<N>)> ddf_ |
An std::function implementing the analytical expression of the hessian function taking an N dimensional point in input and returning an N dimensional square matrix in output representing the hessian expression |
Returns the analytical expression of the field's hessian as a Callable object.
Examples
Define a scalar field having exact gradient equal to and exact hessian matrix given by