Nonlinear Program.Hessian Property
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
public Func<Vector<double>, double, Vector<double>, LinearOperator<double>?, LinearOperator<double>>? Hessian { get; set; }Property Value
Func<Vector<Double>, Double, Vector<Double>, LinearOperator<Double>, LinearOperator<Double>>A function receiving the point, objective weight, multipliers and reusable operator, or null.
Remarks
Return an n-by-n symmetric operator representing the Hessian of weight*f(x)-sum(lambda[i]*c[i](x)). Weight is 1 for minimization and -1 for maximization. Multipliers follow original constraint order: positive for lower bounds, negative for upper bounds, and unrestricted for equalities. Variable bounds have zero curvature. The first call receives a null operator. Subsequent calls may reuse or replace it. When reusing a matrix, overwrite all changed entries, including entries that become zero. Matrices are linear operators.
The operator must remain valid for all products until the next Hessian callback. Do not modify input vectors; copy any input data retained by an operator. Newton-CG supports multiplication-only operators. Direct SQP methods require an explicit matrix; IC/MIC preconditioning requires sparse entries. Sparse consumers capture stored structure, including zeros, and reject later growth. Supplied matrix entries and products must be finite. Sparse SQP callbacks must support trial points outside bounds. A supplied Gauss-Newton approximation is also supported for bounds-only Newton-CG.
Exceptions
| Invalid | A calculation is in progress. |