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

◆ get_ldl()

double stan::math::internal::get_ldl ( const Eigen::Ref< const Eigen::VectorXd >  diagonal,
const Eigen::Ref< const Eigen::VectorXd >  subdiagonal,
const double  shift,
VectorXdd l,
VectorXdd d_plus 
)
inline

Calculates LDL decomposition of a shifted triagonal matrix T.

D is diagonal, L is lower unit triangular (diagonal elements are 1, all elements except diagonal and subdiagonal are 0),T - shift * I = L * D * L^T. Also calculates element growth of D: max(abs(D)).

Parameters
diagonalDiagonal of T
subdiagonalSubdiagonal of T.
shiftShift.
[out]lSubdiagonal of L.
[out]d_plusDiagonal of D.
Returns
Element growth.

Definition at line 83 of file mrrr.hpp.