|
|
◆ zgetri()
| void zgetri |
( |
int |
n, |
|
|
int |
lda, |
|
|
doublecomplex |
a[], |
|
|
int |
ipiv[], |
|
|
doublecomplex |
work[], |
|
|
int |
lwork, |
|
|
int * |
info |
|
) |
| |
Inverse of a complex matrix
- Purpose
- This routine computes the inverse of a matrix using the LU factorization computed by zgetrf.
This method inverts U and then computes inv(A) by solving the system inv(A)*L = inv(U) for inv(A).
- Parameters
-
| [in] | n | Order of the matrix A. (n >= 0) (If n = 0, returns without computation) |
| [in] | lda | Leading dimension of the two dimensional array a[][]. (lda >= max(1, n)) |
| [in,out] | a[] | Array a[la][lda] (la >= n)
[in] The factors L and U from the factorization A = P*L*U as computed by zgetrf.
[out] If info = 0, the inverse of the original matrix A. |
| [in] | ipiv[] | Array ipiv[lipiv] (lipiv >= n)
Pivot indices from zgetrf; for 1 <= i <= n, row i of the matrix was interchanged with row ipiv[i-1]. |
| [out] | work[] | Array work[lwork]
Work array.
On exit, if info = 0, work[0] returns the optimal lwork. |
| [in] | lwork | Length of array work[]. (lwork >= max(1, n))
For optimal efficiency, lwork >= n*nb, where nb is the optimal blocksize.
If lwork = -1, then a workspace query is assumed. The routine only calculates the optimal size of the work array and returns the value in work[0]. |
| [out] | info | = 0: Successful exit
= -1: The argument n had an illegal value (n < 0)
= -2: The argument lda had an illegal value (lda < max(1, n))
= -6: The argument lwork had an illegal value (lwork too small)
= i > 0: The i-th diagonal element of U is exactly zero; the matrix is singular and its inverse could not be computed. |
- Reference
- LAPACK
|