Package de.labathome.trustconstr
Class HessianLinearOperator
java.lang.Object
de.labathome.trustconstr.HessianLinearOperator
- All Implemented Interfaces:
BiFunction<Matrix,Object, Matrix>
Adapter that exposes a matrix-free
HessianProduct as a
BiFunction returning an explicit Hessian Matrix.
Mirrors scipy's LinearOperator-wrapping of hessp in
_minimize_trustregion_constr (minimize_trustregion_constr.py:36):
given a callable hessp(x, p) returning H(x)*p for each
vector p, the wrapper materialises H(x) as a dense
n x n matrix by probing hessp along each Cartesian basis
vector. This is O(n) hessp evaluations -- sufficient for the modest
problem sizes trust-constr is typically used on, and a future hook for
a true matrix-free path when downstream consumers can accept one.
-
Constructor Details
-
HessianLinearOperator
- Parameters:
hessp- matrix-free Hessian-vector product evaluator(x, p, args) -> H(x)*pnVars- number of decision variables (= dimension of the Hessian)
-
-
Method Details
-
apply
- Specified by:
applyin interfaceBiFunction<Matrix,Object, Matrix>
-