HessianFunction.FromLagrangianProduct Method

Adapts a Lagrangian Hessian-vector product to a nonlinear-program Hessian function.

Definition

Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.10.0
C#
public static Func<Vector<double>, double, Vector<double>, LinearOperator<double>?, LinearOperator<double>> FromLagrangianProduct(
	Action<Vector<double>, double, Vector<double>, Vector<double>, Vector<double>> multiply
)

Parameters

multiply  Action<Vector<Double>, Double, Vector<Double>, Vector<Double>, Vector<Double>>
A callback receiving the point, objective weight, constraint multipliers, direction and destination. Write every component of the Hessian of weight*f(x) - sum(lambda[i]*c[i](x)) times the direction into the destination.

Return Value

Func<Vector<Double>, Double, Vector<Double>, LinearOperator<Double>, LinearOperator<Double>>
A function assignable to Hessian.

Remarks

The objective weight is passed through unchanged: 1 for minimization and -1 for maximization. Multipliers follow the original constraint order and sign convention documented by Hessian. The callback applies the weight and constraint curvature; the adapter performs no additional scaling.

Each evaluation creates protected copies of the point and multipliers. The previous operator is ignored. Earlier operators remain valid after subsequent calls. The symmetry, input and destination ownership, exception, concurrency and multiplication-only contracts of FromProduct(Action<Vector<Double>, Vector<Double>, Vector<Double>>) also apply.

Exceptions

ArgumentNullExceptionmultiply is null, or the returned function receives a null point or multipliers.

See Also