Stan Math Library
4.9.0
Automatic Differentiation
|
|
inline |
Finds good shift and shifts a LDL decomposition so as to keep element growth low.
L * D * L^T - shift * I = L2 * D2 * L2^T.
l | Subdiagonal of L. | |
d | Diagonal of D. | |
low | Low bound on wanted shift. | |
high | High bound on wanted shift. | |
max_ele_growth | Maximum desired element growth. If no better options are found, it might be exceeded. | |
max_shift | Maximal difference of shift from wanted bounds. | |
[out] | l2 | Subdiagonal of L2. |
[out] | d2 | Diagonal of D2. |
[out] | shift | Shift. |
[out] | min_element_growth | Element growth achieved with resulting shift. |