getri(3)
getri(3) π β¨ β LAPACK's triangular inverse bestie
Straight from the Library Functions Manual, no cap: this is the page for the getri family, and it's lowkey iconic.
πΈ NAME πΈ
getri β getri: triangular inverse. Yes bestie, the name is a little redundant, but it ate.
β¨ SYNOPSIS β¨
Functions
subroutine cgetri (n, a, lda, ipiv, work, lwork, info)β CGETRIsubroutine dgetri (n, a, lda, ipiv, work, lwork, info)β DGETRIsubroutine sgetri (n, a, lda, ipiv, work, lwork, info)β SGETRIsubroutine zgetri (n, a, lda, ipiv, work, lwork, info)β ZGETRI
π¦ DETAILED DESCRIPTION π¦
okay so this page is the whole getri squad: cgetri, dgetri, sgetri, and zgetri. They all do the triangular inverse thing, and the full function tea is below. π
π₯ FUNCTION DOCUMENTATION π₯
π subroutine cgetri (integer n, complex, dimension( lda, * ) a, integer lda, integer, dimension( * ) ipiv, complex, dimension( * ) work, integer lwork, integer info) β CGETRI
Purpose
CGETRI computes the inverse of a matrix using the LU factorization computed by CGETRF.
This method inverts U and then computes inv(A) by solving the system inv(A)*L = inv(U) for inv(A).
Parameters
- N β
INTEGER. The order of the matrixA.N >= 0. - A β
COMPLEXarray, dimension(LDA,N). On entry, the factorsLandUfrom the factorizationA = P*L*Uas computed byCGETRF. On exit, ifINFO = 0, the inverse of the original matrixA. - LDA β
INTEGER. The leading dimension of the arrayA.LDA >= max(1,N). - IPIV β
INTEGERarray, dimension(N). The pivot indices fromCGETRF; for1<=i<=N, rowiof the matrix was interchanged with rowIPIV(i). - WORK β
COMPLEXarray, dimension(MAX(1,LWORK)). On exit, ifINFO=0, thenWORK(1)returns the optimalLWORK. - LWORK β
INTEGER. The dimension of the arrayWORK.LWORK >= max(1,N). For optimal performanceLWORK >= N*NB, whereNBis the optimal blocksize returned byILAENV.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
- INFO β
INTEGER.= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i,U(i,i)is exactly zero; the matrix is singular and its inverse could not be computed.
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line
113 of file cgetri.f.
π subroutine dgetri (integer n, double precision, dimension( lda, * ) a, integer lda, integer, dimension( * ) ipiv, double precision, dimension( * ) work, integer lwork, integer info) β DGETRI
Purpose
DGETRI computes the inverse of a matrix using the LU factorization computed by DGETRF.
This method inverts U and then computes inv(A) by solving the system inv(A)*L = inv(U) for inv(A).
Parameters
- N β
INTEGER. The order of the matrixA.N >= 0. - A β
DOUBLE PRECISIONarray, dimension(LDA,N). On entry, the factorsLandUfrom the factorizationA = P*L*Uas computed byDGETRF. On exit, ifINFO = 0, the inverse of the original matrixA. - LDA β
INTEGER. The leading dimension of the arrayA.LDA >= max(1,N). - IPIV β
INTEGERarray, dimension(N). The pivot indices fromDGETRF; for1<=i<=N, rowiof the matrix was interchanged with rowIPIV(i). - WORK β
DOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). On exit, ifINFO=0, thenWORK(1)returns the optimalLWORK. - LWORK β
INTEGER. The dimension of the arrayWORK.LWORK >= max(1,N). For optimal performanceLWORK >= N*NB, whereNBis the optimal blocksize returned byILAENV.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
- INFO β
INTEGER.= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i,U(i,i)is exactly zero; the matrix is singular and its inverse could not be computed.
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line
113 of file dgetri.f.
π subroutine sgetri (integer n, real, dimension( lda, * ) a, integer lda, integer, dimension( * ) ipiv, real, dimension( * ) work, integer lwork, integer info) β SGETRI
Purpose
SGETRI computes the inverse of a matrix using the LU factorization computed by SGETRF.
This method inverts U and then computes inv(A) by solving the system inv(A)*L = inv(U) for inv(A).
Parameters
- N β
INTEGER. The order of the matrixA.N >= 0. - A β
REALarray, dimension(LDA,N). On entry, the factorsLandUfrom the factorizationA = P*L*Uas computed bySGETRF. On exit, ifINFO = 0, the inverse of the original matrixA. - LDA β
INTEGER. The leading dimension of the arrayA.LDA >= max(1,N). - IPIV β
INTEGERarray, dimension(N). The pivot indices fromSGETRF; for1<=i<=N, rowiof the matrix was interchanged with rowIPIV(i). - WORK β
REALarray, dimension(MAX(1,LWORK)). On exit, ifINFO=0, thenWORK(1)returns the optimalLWORK. - LWORK β
INTEGER. The dimension of the arrayWORK.LWORK >= max(1,N). For optimal performanceLWORK >= N*NB, whereNBis the optimal blocksize returned byILAENV.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
- INFO β
INTEGER.= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i,U(i,i)is exactly zero; the matrix is singular and its inverse could not be computed.
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line
113 of file sgetri.f.
π subroutine zgetri (integer n, complex*16, dimension( lda, * ) a, integer lda, integer, dimension( * ) ipiv, complex*16, dimension( * ) work, integer lwork, integer info) β ZGETRI
Purpose
ZGETRI 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
- N β
INTEGER. The order of the matrixA.N >= 0. - A β
COMPLEX*16array, dimension(LDA,N). On entry, the factorsLandUfrom the factorizationA = P*L*Uas computed byZGETRF. On exit, ifINFO = 0, the inverse of the original matrixA. - LDA β
INTEGER. The leading dimension of the arrayA.LDA >= max(1,N). - IPIV β
INTEGERarray, dimension(N). The pivot indices fromZGETRF; for1<=i<=N, rowiof the matrix was interchanged with rowIPIV(i). - WORK β
COMPLEX*16array, dimension(MAX(1,LWORK)). On exit, ifINFO=0, thenWORK(1)returns the optimalLWORK. - LWORK β
INTEGER. The dimension of the arrayWORK.LWORK >= max(1,N). For optimal performanceLWORK >= N*NB, whereNBis the optimal blocksize returned byILAENV.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
- INFO β
INTEGER.= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i,U(i,i)is exactly zero; the matrix is singular and its inverse could not be computed.
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line
113 of file zgetri.f.
π AUTHOR π
Generated automatically by Doxygen for LAPACK from the source code.
π Footer tea: LAPACK Version 3.12.0 β’ getri(3) β’ date field: not listed, but the vibes are timeless. Mwah! π
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms