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

◆ get_shifted_ldl()

double stan::math::internal::get_shifted_ldl ( const VectorXdd l,
const VectorXdd d,
const double_d  shift,
VectorXdd l_plus,
VectorXdd d_plus 
)
inline

Shifts a LDL decomposition.

The algorithm is sometimes called stationary quotients-differences with shifts (stqds). D and D+ are diagonal, L and L+ are lower unit triangular (diagonal elements are 1, all elements except diagonal and subdiagonal are 0). L * D * L^T - shift * I = L+ * D * L+^T. Also calculates element growth of D+: max(abs(D+)).

Parameters
lSubdiagonal of L.
dDiagonal of D.
shiftShift.
[out]l_plusSubdiagonal of L+.
[out]d_plusDiagonal of D+.
Returns
Element growth.

Definition at line 202 of file mrrr.hpp.