template<typename NewtonStateT , typename LLFun , typename LLTupleArgs , typename CovarMat >
| void stan::math::internal::CholeskyWSolverBlock::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 block-diagonal Hessian solver.
Computes the block Hessian, its square root via Schur decomposition, forms B = I + W_r * Sigma * W_r, performs Cholesky factorization, and solves for the new a vector.
- Template Parameters
-
| NewtonStateT | Type of the Newton state |
| LLFun | Type of the log-likelihood functor |
| LLTupleArgs | Type of the likelihood arguments tuple |
| CovarMat | Type of the covariance matrix |
- Parameters
-
| [in,out] | state | Shared Newton state (modified: B, b, curr().a()) |
| [in] | ll_fun | Log-likelihood functor |
| [in,out] | ll_args | Additional arguments for the likelihood |
| [in] | covariance | Prior covariance matrix Sigma |
| [in] | hessian_block_size | Size of each Hessian block (must divide theta_size) |
| [in,out] | msgs | Output stream for diagnostic messages (may be nullptr) |
- Exceptions
-
| std::domain_error | If Hessian is not positive definite or Cholesky fails |
Definition at line 632 of file laplace_marginal_density_estimator.hpp.