CUTEstProblem.ihess

CUTEstProblem.ihess(x, cons_index=None)

Evaluate the Hessian of the objective or the i-th constraint.

# Hessian of the objective
H = problem.ihess(x)
# Hessian of i-th constraint
H = problem.ihess(x, cons_index=i)

For large problems, problem.isphess returns sparse matrices.

This calls CUTEst routine CUTEST_cidh or CUTEST_udh.

Parameters:
  • x (numpy.ndarray with shape (n,)) – input vector

  • cons_index (int, optional) – index of constraint (default is None -> use objective). Must be in 0..self.m-1.

Returns:

Hessian of objective or a single constraint at x

Return type:

numpy.ndarray(n,n)