cv.ConjGradSolver/ConjGradSolver - MATLAB File Help |
Creates an ConjGradSolver object
solver = cv.ConjGradSolver()
solver = cv.ConjGradSolver('OptionName', optionValue, ...)
gradfun
and gradeps
are optional fields):
calc
method. It should receive a vector of the specified
dimension, and return a scalar value of the objective
function evaluated at that point.getGradient
method. It should receive an ndims
vector,
and return a vector of partial derivatives. If an empty
string is specified (default), the gradient is approximated
using finite difference method as:
F'(x) = (F(x+h) - F(x-h)) / 2*h
(at the cost of exta
function evaluations and less accuracy).h
used in finite difference
method. default 1e-3struct('type','Count+EPS', 'maxCount',5000, 'epsilon',1e-6)
All the parameters are optional, so this procedure can be called
even without parameters at all. In this case, the default values
will be used. As default value for terminal criteria are the
only sensible ones, ObjectiveFunction
should be set upon the
obtained object, if the function was not given in the constructor.
Otherwise, the two ways (submit it to ctor or miss it out and
set the ObjectiveFunction
property) are absolutely equivalent
(and will drop the same errors in the same way, should invalid
input be detected).