pub fn polish(
a: &CsrMatrix<f64>,
b: &[f64],
x: &mut [DoubleDouble],
solve: &mut dyn FnMut(&mut [f64]),
opts: &PolishOptions,
) -> Result<PolishReport, VerifyError>Expand description
Algorithm P. x enters as the approximate solution (trailing
components zero for an f64 solution) and leaves polished; solve
overwrites its argument s with ≈ A⁻¹ s in f64.
The residual norm never increases (invariant P1 of Chapter 11.10): a
correction that makes it worse is undone. The result is not a
certificate; residual_of_dd certifies it.
§Errors
VerifyError::Dimension, also when a is not square.
§Panics
If a violates the invariants of its type.