![]() |
Stan Math Library
5.2.0
Automatic Differentiation
|
|
inline |
Run a Newton loop with a solver policy, updating the shared state.
This helper centralizes the iteration/line-search logic shared across solver policies while preserving the step counter and fallback behavior.
| SolverPolicy | Either Solver 1, 2, or 3 policy struct |
| NewtonStateT | Type holding state with solver |
| OptionsT | struct of options for laplace |
| LLFunT | Callable accepting (ThetaVec, LLTupleArgs...) |
| LLTupleArgsT | tuple of additional args for LLFunT |
| CovarMatT | Type of the covariance matrix |
| [in,out] | solver | The solver policy instance |
| [in,out] | state | Shared Newton optimization state |
| [in] | options | Solver options |
| [in,out] | step_iter | Current iteration number (modified) |
| [in] | ll_fun | Log-likelihood functor |
| [in] | ll_args | Additional arguments for the likelihood |
| [in] | covariance | Prior covariance matrix Sigma |
| [in] | update_fun | Callable to update proposal state in line search |
| [in,out] | msgs | Output stream for diagnostic messages (may be nullptr) |
Stop when objective change is small, or when a rejected Wolfe step fails to improve; finish_update then exits the Newton loop.
Definition at line 927 of file laplace_marginal_density_estimator.hpp.