Computes the LU decomposition with pivoting.
[L, U, P] = linalg_factorlupivot ( A , verbose )
a n-by-n matrix of doubles
a 1-by-1 matrix of boolean, set to true to display intermediate messages
a n-by-n matrix of doubles, lower triangular.
a n-by-n matrix of doubles, upper triangular.
a n-by-n matrix of doubles, with 0 or 1 entries
Decomposes A as P*A = L*U with L lower triangular and unit diagonal, U upper triangular and non-unit diagonal, P a permutation matrix with 0/1 entries. This algorithm might be sensitive to inaccuracies if A near singular. There is no solution is A is singular. If A is not ill-conditionned, the algorithm is accurate. Uses an effective algorithm with vectorization.