CGTSVX(3)
π NAME π
Okay bestie, this is cgtsvx.f(3) from the Library Functions Manual β and the NAME entry is literally this whole absolute-path situation:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cgtsvx.f
Yes, that entire path is the name. No cap. π
β¨ SYNOPSIS β¨
π§ Functions/Subroutines π§
subroutine CGTSVX (fact, trans, n, nrhs, dl, d, du, dlf, df, duf, du2,
ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
The official little tagline is: CGTSVX computes the solution to system of linear equations A * X = B for GT matrices π«Ά
π Function/Subroutine Documentation π
subroutine CGTSVX (character fact, character trans, integer n, integer nrhs,
complex, dimension( * ) dl, complex, dimension( * ) d, complex,
dimension( * ) du, complex, dimension( * ) dlf, complex, dimension( * )
df, complex, dimension( * ) duf, complex, dimension( * ) du2, integer,
dimension( * ) ipiv, complex, dimension( ldb, * ) b, integer ldb,
complex, dimension( ldx, * ) x, integer ldx, real rcond, real,
dimension( * ) ferr, real, dimension( * ) berr, complex, dimension( * )
work, real, dimension( * ) rwork, integer info)
And the one-liner again, because she said it twice and she meant it: CGTSVX computes the solution to system of linear equations A * X = B for GT matrices β¨
π Purpose π
CGTSVX uses the LU factorization to compute the solution to a complex system of linear equations A * X = B, A**T * X = B, or A**H * X = B, where A is a tridiagonal matrix of order N, and X and B are N-by-NRHS matrices.
It also provides error bounds on the solution and a condition estimate. Obsessed with the thoroughness, honestly. π¦
π Description π
The following steps are performed:
- If
FACT = 'N', the LU decomposition is used to factor the matrix A asA = L * U, where L is a product of permutation and unit lower bidiagonal matrices and U is upper triangular with nonzeros in only the main diagonal and first two superdiagonals. - If some
U(i,i)=0, so that U is exactly singular, then the routine returns withINFO = i. Otherwise, the factored form of A is used to estimate the condition number of the matrix A. If the reciprocal of the condition number is less than machine precision,INFO = N+1is returned as a warning, but the routine still goes on to solve for X and compute error bounds as described below. - The system of equations is solved for X using the factored form of A.
- Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it.
π§Έ Parameters π§Έ
FACTβCHARACTER*1. Specifies whether or not the factored form of A has been supplied on entry.= 'F':DLF,DF,DUF,DU2, andIPIVcontain the factored form of A;DL,D,DU,DLF,DF,DUF,DU2andIPIVwill not be modified.= 'N': the matrix will be copied toDLF,DF, andDUFand factored. πTRANSβCHARACTER*1. Specifies the form of the system of equations:= 'N':A * X = B(No transpose)= 'T':A**T * X = B(Transpose)= 'C':A**H * X = B(Conjugate transpose) πΈNβINTEGER. The order of the matrix A.N >= 0.NRHSβINTEGER. The number of right hand sides, i.e., the number of columns of the matrix B.NRHS >= 0.DLβCOMPLEX array, dimension (N-1). The(n-1)subdiagonal elements of A.DβCOMPLEX array, dimension (N). Thendiagonal elements of A.DUβCOMPLEX array, dimension (N-1). The(n-1)superdiagonal elements of A.DLFβCOMPLEX array, dimension (N-1). IfFACT = 'F', thenDLFis an input argument and on entry contains the(n-1)multipliers that define the matrix L from the LU factorization of A as computed byCGTTRF. IfFACT = 'N', thenDLFis an output argument and on exit contains the(n-1)multipliers that define the matrix L from the LU factorization of A.DFβCOMPLEX array, dimension (N). IfFACT = 'F', thenDFis an input argument and on entry contains thendiagonal elements of the upper triangular matrix U from the LU factorization of A. IfFACT = 'N', thenDFis an output argument and on exit contains thendiagonal elements of the upper triangular matrix U from the LU factorization of A.DUFβCOMPLEX array, dimension (N-1). IfFACT = 'F', thenDUFis an input argument and on entry contains the(n-1)elements of the first superdiagonal of U. IfFACT = 'N', thenDUFis an output argument and on exit contains the(n-1)elements of the first superdiagonal of U.DU2βCOMPLEX array, dimension (N-2). IfFACT = 'F', thenDU2is an input argument and on entry contains the(n-2)elements of the second superdiagonal of U. IfFACT = 'N', thenDU2is an output argument and on exit contains the(n-2)elements of the second superdiagonal of U.IPIVβINTEGER array, dimension (N). IfFACT = 'F', thenIPIVis an input argument and on entry contains the pivot indices from the LU factorization of A as computed byCGTTRF. IfFACT = 'N', thenIPIVis an output argument and on exit contains the pivot indices from the LU factorization of A; rowiof the matrix was interchanged with rowIPIV(i).IPIV(i)will always be eitheriori+1;IPIV(i) = iindicates a row interchange was not required. πBβCOMPLEX array, dimension (LDB,NRHS). TheN-by-NRHSright hand side matrix B.LDBβINTEGER. The leading dimension of the array B.LDB >= max(1,N).XβCOMPLEX array, dimension (LDX,NRHS). IfINFO = 0orINFO = N+1, theN-by-NRHSsolution matrix X.LDXβINTEGER. The leading dimension of the array X.LDX >= max(1,N).RCONDβREAL. The estimate of the reciprocal condition number of the matrix A. IfRCONDis less than the machine precision (in particular, ifRCOND = 0), the matrix is singular to working precision. This condition is indicated by a return code ofINFO > 0.FERRβREAL array, dimension (NRHS). The estimated forward error bound for each solution vectorX(j)(thej-th column of the solution matrix X). IfXTRUEis the true solution corresponding toX(j),FERR(j)is an estimated upper bound for the magnitude of the largest element in(X(j) - XTRUE)divided by the magnitude of the largest element inX(j). The estimate is as reliable as the estimate forRCOND, and is almost always a slight overestimate of the true error. π so careful, so real.BERRβREAL array, dimension (NRHS). The componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element of A or B that makesX(j)an exact solution).WORKβCOMPLEX array, dimension (2*N).RWORKβREAL array, dimension (N).INFOβINTEGER.= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, andiis<= N:U(i,i)is exactly zero. The factorization has not been completed unlessi = N, but the factor U is exactly singular, so the solution and error bounds could not be computed.RCOND = 0is returned.= N+1: U is nonsingular, butRCONDis less than machine precision, meaning that the matrix is singular to working precision. Nevertheless, the solution and error bounds are computed because there are a number of situations where the computed solution can be more accurate than the value ofRCONDwould suggest. π₯
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 291 of file cgtsvx.f. π―
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
Okay thatβs the whole page, bestie! This was LAPACK Version 3.12.0, from /home/abui...RC/cgtsvx.f(3) β mwah, go slay your tridiagonal system πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms