![]() |
Stan Math Library
5.2.0
Automatic Differentiation
|
|
inline |
Retry evaluation of a step until it passes a validity check.
The update callable is invoked with (curr, prev, eval, p) and is expected to fill eval (at eval.alpha()) with the objective and directional derivative. If the evaluation is not valid, the backoff callable should shrink eval.alpha() and return whether another retry should be attempted. The validity check can inspect the evaluation and, for non-void updates, the returned status.
| Update | Callable that performs one evaluation step. Must accept 4 arguments. |
| Proposal | Proposed step type passed to update. |
| Curr | Current state type passed to update. |
| Prev | Previous state type passed to update. |
| Eval | Evaluation record containing alpha/obj/dir. |
| P | Search direction type passed to update. |
| Backoff | Callable that shrinks eval.alpha() and returns a bool. |
| [in] | update | Evaluator invoked as update(curr, prev, eval, p). |
| [in,out] | proposal | Proposed step forwarded to update. |
| [in] | curr | Current state forwarded to update. |
| [in] | prev | Previous state forwarded to update. |
| [in,out] | eval | Evaluation record, updated in-place by update. |
| [in] | p | Search direction forwarded to update. |
| [in] | backoff | Shrinks alpha and returns whether another retry should occur. |
Definition at line 579 of file wolfe_line_search.hpp.