Skip to content

Commit 792f518

Browse files
update callback docstring
1 parent 1564813 commit 792f518

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/LMTR_alg.jl

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -147,21 +147,7 @@ The algorithm stops either when `√(ξₖ/νₖ) < atol + rtol*√(ξ₀/ν₀)
147147
The value returned is a `GenericExecutionStats`, see `SolverCore.jl`.
148148
149149
# Callback
150-
The callback is called at each iteration.
151-
The expected signature of the callback is `callback(nlp, solver, stats)`, and its output is ignored.
152-
Changing any of the input arguments will affect the subsequent iterations.
153-
In particular, setting `stats.status = :user` will stop the algorithm.
154-
All relevant information should be available in `nlp` and `solver`.
155-
Notably, you can access, and modify, the following:
156-
- `solver.xk`: current iterate;
157-
- `solver.∇fk`: current gradient;
158-
- `stats`: structure holding the output of the algorithm (`GenericExecutionStats`), which contains, among other things:
159-
- `stats.iter`: current iteration counter;
160-
- `stats.objective`: current objective function value;
161-
- `stats.solver_specific[:smooth_obj]`: current value of the smooth part of the objective function;
162-
- `stats.solver_specific[:nonsmooth_obj]`: current value of the nonsmooth part of the objective function;
163-
- `stats.status`: current status of the algorithm. Should be `:unknown` unless the algorithm has attained a stopping criterion. Changing this to anything other than `:unknown` will stop the algorithm, but you should use `:user` to properly indicate the intention;
164-
- `stats.elapsed_time`: elapsed time in seconds.
150+
$(callback_docstring)
165151
"""
166152
function LMTR(
167153
nls::AbstractNLSModel,

0 commit comments

Comments
 (0)