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

◆ solve_step()

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

Perform one Newton step using covariance Cholesky solver.

Computes the block diagonal Hessian, forms B = I + K_root^T * W * K_root, performs Cholesky factorization, and solves for the new a vector using triangular solves.

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]stateShared Newton state (modified: B, b, curr().a())
[in]ll_funLog-likelihood functor
[in]ll_argsAdditional arguments for the likelihood
[in]covariancePrior covariance matrix Sigma
[in]hessian_block_sizeSize of each Hessian block
[in,out]msgsOutput stream for diagnostic messages (may be nullptr)
Exceptions
std::domain_errorIf Cholesky factorization fails

Definition at line 752 of file laplace_marginal_density_estimator.hpp.