Home > manopt > core > canGetCost.m

# canGetCost

## PURPOSE Checks whether the cost function can be computed for a problem structure.

## SYNOPSIS function candoit = canGetCost(problem)

## DESCRIPTION ``` Checks whether the cost function can be computed for a problem structure.

function candoit = canGetCost(problem)

Returns true if the cost function can be computed given the problem
description, false otherwise.

## CROSS-REFERENCE INFORMATION This function calls:
This function is called by:
• getGradientFD Computes an approx. of the gradient w/ finite differences of the cost.
• arc Adaptive regularization by cubics (ARC) minimization algorithm for Manopt
• barzilaiborwein Riemannian Barzilai-Borwein solver with non-monotone line-search.
• rlbfgs Riemannian limited memory BFGS solver for smooth objective functions.
• approxgradientFD Gradient approx. fnctn handle based on finite differences of the cost.
• pso Particle swarm optimization (PSO) for derivative-free minimization.
• steepestdescent Steepest descent (gradient descent) minimization algorithm for Manopt.
• trustregions Riemannian trust-regions solver for optimization on manifolds.
• checkdiff Checks the consistency of the cost function and directional derivatives.
• checkgradient Checks the consistency of the cost function and the gradient.
• checkhessian Checks the consistency of the cost function and the Hessian.
• manoptsolve Gateway helper function to call a Manopt solver, chosen in the options.
• plotprofile Plot the cost function along a geodesic or a retraction path.
• surfprofile Plot the cost function as a surface over a 2-dimensional subspace.

## SOURCE CODE ```0001 function candoit = canGetCost(problem)
0002 % Checks whether the cost function can be computed for a problem structure.
0003 %
0004 % function candoit = canGetCost(problem)
0005 %
0006 % Returns true if the cost function can be computed given the problem
0007 % description, false otherwise.
0008 %