Home > manopt > core > canGetApproxHessian.m

# canGetApproxHessian

## PURPOSE Checks whether an approximate Hessian can be computed for this problem.

## SYNOPSIS function candoit = canGetApproxHessian(problem)

## DESCRIPTION ``` Checks whether an approximate Hessian can be computed for this problem.

function candoit = canGetApproxHessian(problem)

Returns true if an approximate Hessian of the cost function is provided
in the given problem description, false otherwise.
If a Hessian is defined but no approximate Hessian is defined explicitly,
returns false.

Even if this returns false, calls to getApproxHessian may succeed, as
they will be redirected to getHessianFD. The latter simply requires
availability of gradients in problem, and vector transports in problem.M.

## CROSS-REFERENCE INFORMATION This function calls:
This function is called by:
• arc Adaptive regularization by cubics (ARC) minimization algorithm for Manopt
• preconhessiansolve Preconditioner based on the inverse Hessian, by solving linear systems.
• trustregions Riemannian trust-regions solver for optimization on manifolds.
• hessianmatrix Computes a matrix which represents the Hessian in some tangent basis.
• hessianspectrum Returns the eigenvalues of the (preconditioned) Hessian at x.

## SOURCE CODE ```0001 function candoit = canGetApproxHessian(problem)
0002 % Checks whether an approximate Hessian can be computed for this problem.
0003 %
0004 % function candoit = canGetApproxHessian(problem)
0005 %
0006 % Returns true if an approximate Hessian of the cost function is provided
0007 % in the given problem description, false otherwise.
0008 % If a Hessian is defined but no approximate Hessian is defined explicitly,
0009 % returns false.
0010 %
0011 % Even if this returns false, calls to getApproxHessian may succeed, as
0012 % they will be redirected to getHessianFD. The latter simply requires
0013 % availability of gradients in problem, and vector transports in problem.M.
0014 %