Solving a General System of Linear Equations (sv)
sv computes the solution to a real system of linear equations \( AX=B \), where \( A \) is an \( n \times n \) matrix and \( X \) and \( B \) are \( n \times n_{\text{rhs}} \) matrices.
The \( LU \) decomposition with partial pivoting and row interchanges is used to factor \( A \) as
\[ A = P L U \]where \( P \) is a permutation matrix, \( L \) is unit lower triangular, and \( U \) is upper triangular. The factored form of \( A \) is then used to solve the system of equations \( A X = B \).
Multiple Right-Hand Sides
A |
(input/output) real or complex valued GeMatrix |
piv |
(output) integer valued DenseVector |
B |
(input/output) real or complex valued GeMatrix
On entry, the \( n \times n_{\text{rhs}} \) matrix of right hand side matrix \( B \). |
Return value:
i=0 |
Successful exit. |
i>0 |
\( U_{i,i} \) is exactly zero. The factorization has been completed, but the factor \( U \) is exactly singular, so the solution could not be computed. |
Single Right-Hand Side
A |
(input/output) real or complex valued GeMatrix |
piv |
(output) integer valued DenseVector |
b |
(input/output) real or complex valued DenseVector |
Return value:
i=0 |
Successful exit. |
i>0 |
\( U_{i,i} \) is exactly zero. The factorization has been completed, but the factor \( U \) is exactly singular, so the solution could not be computed. |