Solvers
Solvers can be applied to AbstractManoptProblem
s with solver specific AbstractManoptSolverState
.
List of Algorithms
The following algorithms are currently available
Note that the solvers (their AbstractManoptSolverState
, to be precise) can also be decorated to enhance your algorithm by general additional properties, see debug output and recording values. This is done using the debug=
and record=
keywords in the function calls. Similarly, since 0.4 we provide a (simple) caching of the objective function using the cache=
keyword in any of the function calls..
Technical Details
The main function a solver calls is
Manopt.solve!
— Methodsolve!(p::AbstractManoptProblem, s::AbstractManoptSolverState)
run the solver implemented for the AbstractManoptProblem
p
and the AbstractManoptSolverState
s
employing initialize_solver!
, step_solver!
, as well as the stop_solver!
of the solver.
which is a framework that you in general should not change or redefine. It uses the following methods, which also need to be implemented on your own algorithm, if you want to provide one.
Manopt.initialize_solver!
— Functioninitialize_solver!(ams::AbstractManoptProblem, amp::AbstractManoptSolverState)
Initialize the solver to the optimization AbstractManoptProblem
amp
by initializing the necessary values in the AbstractManoptSolverState
amp
.
initialize_solver!(amp::AbstractManoptProblem, dss::DebugSolverState)
Extend the initialization of the solver by a hook to run debug that were added to the :Start
and :All
entries of the debug lists.
initialize_solver!(ams::AbstractManoptProblem, rss::RecordSolverState)
Extend the initialization of the solver by a hook to run records that were added to the :Start
entry.
Manopt.step_solver!
— Functionstep_solver!(amp::AbstractManoptProblem, ams::AbstractManoptSolverState, i)
Do one iteration step (the i
th) for an AbstractManoptProblem
p
by modifying the values in the AbstractManoptSolverState
ams
.
step_solver!(amp::AbstractManoptProblem, dss::DebugSolverState, i)
Extend the i
th step of the solver by a hook to run debug prints, that were added to the :Step
and :All
entries of the debug lists.
step_solver!(amp::AbstractManoptProblem, rss::RecordSolverState, i)
Extend the i
th step of the solver by a hook to run records, that were added to the :Iteration
entry.
Manopt.get_solver_result
— Functionget_solver_result(ams::AbstractManoptSolverState)
Return the final result after all iterations that is stored within the AbstractManoptSolverState
ams
, which was modified during the iterations.
Manopt.get_solver_return
— Functionget_solver_return(O::AbstractManoptSolverState)
determine the result value of a call to a solver. By default this returns the same as get_solver_result
, i.e. the last iterate or (approximate) minimizer.
get_solver_return(O::ReturnSolverState)
return the internally stored state of the ReturnSolverState
instead of the minimizer. This means that when the state are decorated like this, the user still has to call get_solver_result
on the internal state separately.
Manopt.stop_solver!
— Methodstop_solver!(amp::AbstractManoptProblem, ams::AbstractManoptSolverState, i)
depending on the current AbstractManoptProblem
amp
, the current state of the solver stored in AbstractManoptSolverState
ams
and the current iterate i
this function determines whether to stop the solver, which by default means to call the internal StoppingCriterion
. ams.stop