Function LU_refine (o2scl_linalg)

O2scl : Function List

template<class mat_t, class mat2_t, class vec_t, class vec2_t, class vec3_t>
int o2scl_linalg::LU_refine(const size_t N, const mat_t &A, const mat2_t &LU, const o2scl::permutation &p, const vec_t &b, vec2_t &x, vec3_t &residual)

Refine the solution of a linear system.

These functions apply an iterative improvement to x, the solution of A x = b, using the LU decomposition of A into (LU,p). The initial residual r = A x - b is also computed and stored in residual.