Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ solve_step()

template<typename NewtonStateT , typename LLFun , typename LLTupleArgs , typename CovarMat >
void stan::math::internal::CholeskyWSolverDiag::solve_step ( NewtonStateT &  state,
const LLFun &  ll_fun,
const LLTupleArgs &  ll_args,
const CovarMat &  covariance,
int  ,
std::ostream *  msgs 
)
inline

Perform one Newton step using diagonal Hessian solver.

Computes the diagonal Hessian, forms B = I + W_r * Sigma * W_r, performs Cholesky factorization, and solves for the new a vector.

Template Parameters
NewtonStateTType of the Newton state
LLFunType of the log-likelihood functor
LLTupleArgsType of the likelihood arguments tuple
CovarMatType of the covariance matrix
Parameters
[in,out]stateShared Newton state (modified: B, b, curr().a())
[in]ll_funLog-likelihood functor
[in,out]ll_argsAdditional arguments for the likelihood
[in]covariancePrior covariance matrix Sigma
[in]hessian_block_sizeIgnored for diagonal solver
[in,out]msgsOutput stream for diagnostic messages (may be nullptr)
Exceptions
std::domain_errorIf Hessian is not positive definite or Cholesky fails

Definition at line 501 of file laplace_marginal_density_estimator.hpp.