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

◆ find_shift()

void stan::math::internal::find_shift ( const VectorXdd l,
const VectorXdd d,
const double_d  low,
const double_d  high,
const double  max_ele_growth,
const double_d  max_shift,
VectorXdd l2,
VectorXdd d2,
double_d shift,
double &  min_element_growth 
)
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.

Parameters
lSubdiagonal of L.
dDiagonal of D.
lowLow bound on wanted shift.
highHigh bound on wanted shift.
max_ele_growthMaximum desired element growth. If no better options are found, it might be exceeded.
max_shiftMaximal difference of shift from wanted bounds.
[out]l2Subdiagonal of L2.
[out]d2Diagonal of D2.
[out]shiftShift.
[out]min_element_growthElement growth achieved with resulting shift.

Definition at line 242 of file mrrr.hpp.