Home > manopt > core > canGetSqrtPrecon.m

# canGetSqrtPrecon

## PURPOSE Checks whether a square root of preconditioner was specified in problem.

## SYNOPSIS function candoit = canGetSqrtPrecon(problem)

## DESCRIPTION ``` Checks whether a square root of preconditioner was specified in problem.

function candoit = canGetSqrtPrecon(problem)

Returns true if the problem structure allows for applying the square root
of a preconditioner to tangent vectors at a given point. The square root
of the preconditioner at x must be a symmetric, positive definite
operator Q such that applying Q twice (Q o Q) amounts to applying the
preconditioner once. If both a preconditioner and a square root of
preconditioner are provided, it is the user's responsibility to ensure
their compatibility.

Similarly to getPrecon, if the present function returns false, calls to
getSqrtPrecon will still work: they will act as the identity. Note that
this may be incompatible with the preconditioner if it is given. Thus,
always check by calling canGetSqrtPrecon first.

## CROSS-REFERENCE INFORMATION This function calls:
This function is called by:
• canGetPrecon Checks whether a preconditioner was specified in the problem description.
• getPrecon Applies the preconditioner for the Hessian of the cost at x along d.
• hessianspectrum Returns the eigenvalues of the (preconditioned) Hessian at x.

## SOURCE CODE ```0001 function candoit = canGetSqrtPrecon(problem)
0002 % Checks whether a square root of preconditioner was specified in problem.
0003 %
0004 % function candoit = canGetSqrtPrecon(problem)
0005 %
0006 % Returns true if the problem structure allows for applying the square root
0007 % of a preconditioner to tangent vectors at a given point. The square root
0008 % of the preconditioner at x must be a symmetric, positive definite
0009 % operator Q such that applying Q twice (Q o Q) amounts to applying the
0010 % preconditioner once. If both a preconditioner and a square root of
0011 % preconditioner are provided, it is the user's responsibility to ensure
0012 % their compatibility.
0013 %
0014 % Similarly to getPrecon, if the present function returns false, calls to
0015 % getSqrtPrecon will still work: they will act as the identity. Note that
0016 % this may be incompatible with the preconditioner if it is given. Thus,
0017 % always check by calling canGetSqrtPrecon first.
0018 %