DGBSVX(3)
πΈ NAME πΈ
Okay so this is DGBSVX(3) from the Library Functions Manual, and the source file is /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dgbsvx.f β bestie, we are in the LAPACK source directory and it's giving band-matrix solver energy π
β¨ SYNOPSIS β¨
π§ Functions/Subroutines π§
subroutine DGBSVX (fact, trans, n, kl, ku, nrhs, ab, ldab, afb, ldafb, ipiv, equed, r, c, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)βDGBSVXcomputes the solution to system of linear equationsA * X = Bfor GB matrices
π Function/Subroutine Documentation π
subroutine DGBSVX (character fact, character trans, integer n, integer kl,
integer ku, integer nrhs, double precision, dimension( ldab, * ) ab,
integer ldab, double precision, dimension( ldafb, * ) afb, integer
ldafb, integer, dimension( * ) ipiv, character equed, double precision,
dimension( * ) r, double precision, dimension( * ) c, double precision,
dimension( ldb, * ) b, integer ldb, double precision, dimension( ldx, *
) x, integer ldx, double precision rcond, double precision, dimension( *
) ferr, double precision, dimension( * ) berr, double precision,
dimension( * ) work, integer, dimension( * ) iwork, integer info)
DGBSVX computes the solution to system of linear equations A * X = B for GB matrices. Periodt. π
π Purpose π
Real talk: DGBSVX uses the LU factorization to compute the solution to a real system of linear equations A * X = B, A**T * X = B, or A**H * X = B, where A is a band matrix of order N with KL subdiagonals and KU superdiagonals, and X and B are N-by-NRHS matrices.
Error bounds on the solution and a condition estimate are also provided. So yes, it's not just solving β it's also doing the little extra check-in, and we love that for us π«Ά
π¦ Description π¦
Here's the exact step-by-step tea this subroutine performs, bestie π:
- If
FACT = 'E', real scaling factors are computed to equilibrate the system:
TRANS = 'N': diag(R)*A*diag(C) *inv(diag(C))*X = diag(R)*B
TRANS = 'T': (diag(R)*A*diag(C))**T *inv(diag(R))*X = diag(C)*B
TRANS = 'C': (diag(R)*A*diag(C))**H *inv(diag(R))*X = diag(C)*B
Whether or not the system will be equilibrated depends on the scaling of the matrix A, but if equilibration is used, A is overwritten by diag(R)*A*diag(C) and B by diag(R)*B (if TRANS='N') or diag(C)*B (if TRANS = 'T' or 'C').
- If
FACT = 'N'or'E', the LU decomposition is used to factor the matrixA(after equilibration ifFACT = 'E') as
A = L * U
where L is a product of permutation and unit lower triangular matrices with KL subdiagonals, and U is upper triangular with KL+KU superdiagonals.
- If some
U(i,i)=0, so thatUis exactly singular, then the routine returns withINFO = i. Otherwise, the factored form ofAis used to estimate the condition number of the matrixA. If the reciprocal of the condition number is less than machine precision, warning:INFO = N+1is returned as a warning, but the routine still goes on to solve forXand compute error bounds as described below. So it's warning you, not ghosting you. π - The system of equations is solved for
Xusing the factored form ofA. - Iterative refinement is applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it. It's giving self-improvement era. β¨
- If equilibration was used, the matrix
Xis premultiplied bydiag(C)(ifTRANS = 'N') ordiag(R)(ifTRANS = 'T'or'C') so that it solves the original system before equilibration.
π Parameters π
FACTβFACTisCHARACTER*1. It specifies whether or not the factored form of the matrixAis supplied on entry, and if not, whether the matrixAshould be equilibrated before it is factored.= 'F': on entry,AFBandIPIVcontain the factored form ofA. IfEQUEDis not'N', the matrixAhas been equilibrated with scaling factors given byRandC.AB,AFB, andIPIVare not modified.= 'N': the matrixAwill be copied toAFBand factored.= 'E': the matrixAwill be equilibrated if necessary, then copied toAFBand factored.
TRANSβTRANSisCHARACTER*1. It 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(Transpose)
NβNisINTEGER. The number of linear equations, i.e., the order of the matrixA.N >= 0.KLβKLisINTEGER. The number of subdiagonals within the band ofA.KL >= 0.KUβKUisINTEGER. The number of superdiagonals within the band ofA.KU >= 0.NRHSβNRHSisINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.ABβABisDOUBLE PRECISIONarray, dimension(LDAB,N). On entry, the matrixAin band storage, in rows1toKL+KU+1. Thej-th column ofAis stored in thej-th column of the arrayABas follows:AB(KU+1+i-j,j) = A(i,j) for max(1,j-KU)<=i<=min(N,j+kl).
If FACT = 'F' and EQUED is not 'N', then A must have been equilibrated by the scaling factors in R and/or C. AB is not modified if FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
On exit, if EQUED .ne. 'N', A is scaled as follows:
EQUED = 'R':A := diag(R) * AEQUED = 'C':A := A * diag(C)EQUED = 'B':A := diag(R) * A * diag(C).
LDABβLDABisINTEGER. The leading dimension of the arrayAB.LDAB >= KL+KU+1.AFBβAFBisDOUBLE PRECISIONarray, dimension(LDAFB,N). IfFACT = 'F', thenAFBis an input argument and on entry contains details of the LU factorization of the band matrixA, as computed byDGBTRF.Uis stored as an upper triangular band matrix withKL+KUsuperdiagonals in rows1toKL+KU+1, and the multipliers used during the factorization are stored in rowsKL+KU+2to2*KL+KU+1. IfEQUED .ne. 'N', thenAFBis the factored form of the equilibrated matrixA.
If FACT = 'N', then AFB is an output argument and on exit returns details of the LU factorization of A.
If FACT = 'E', then AFB is an output argument and on exit returns details of the LU factorization of the equilibrated matrix A (see the description of AB for the form of the equilibrated matrix).
LDAFBβLDAFBisINTEGER. The leading dimension of the arrayAFB.LDAFB >= 2*KL+KU+1.IPIVβIPIVisINTEGERarray, dimension(N). IfFACT = 'F', thenIPIVis an input argument and on entry contains the pivot indices from the factorizationA = L*Uas computed byDGBTRF; rowiof the matrix was interchanged with rowIPIV(i).
If FACT = 'N', then IPIV is an output argument and on exit contains the pivot indices from the factorization A = L*U of the original matrix A.
If FACT = 'E', then IPIV is an output argument and on exit contains the pivot indices from the factorization A = L*U of the equilibrated matrix A.
EQUEDβEQUEDisCHARACTER*1. It specifies the form of equilibration that was done.= 'N': No equilibration (always true ifFACT = 'N').= 'R': Row equilibration, i.e.,Ahas been premultiplied bydiag(R).= 'C': Column equilibration, i.e.,Ahas been postmultiplied bydiag(C).= 'B': Both row and column equilibration, i.e.,Ahas been replaced bydiag(R) * A * diag(C).
EQUED is an input argument if FACT = 'F'; otherwise, it is an output argument.
RβRisDOUBLE PRECISIONarray, dimension(N). The row scale factors forA. IfEQUED = 'R'or'B',Ais multiplied on the left bydiag(R); ifEQUED = 'N'or'C',Ris not accessed.Ris an input argument ifFACT = 'F'; otherwise,Ris an output argument. IfFACT = 'F'andEQUED = 'R'or'B', each element ofRmust be positive.CβCisDOUBLE PRECISIONarray, dimension(N). The column scale factors forA. IfEQUED = 'C'or'B',Ais multiplied on the right bydiag(C); ifEQUED = 'N'or'R',Cis not accessed.Cis an input argument ifFACT = 'F'; otherwise,Cis an output argument. IfFACT = 'F'andEQUED = 'C'or'B', each element ofCmust be positive.BβBisDOUBLE PRECISIONarray, dimension(LDB,NRHS). On entry, the right hand side matrixB.
On exit:
- if
EQUED = 'N',Bis not modified; - if
TRANS = 'N'andEQUED = 'R'or'B',Bis overwritten bydiag(R)*B; - if
TRANS = 'T'or'C'andEQUED = 'C'or'B',Bis overwritten bydiag(C)*B.
LDBβLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).Xβ this is where part 1 stops; the description ofXcontinues in part 2, bestie πXβXis aDOUBLE PRECISIONarray, dimension(LDX,NRHS). IfINFO = 0orINFO = N+1, it's theN-by-NRHSsolution matrixXto the original system of equations. Note thatAandBare modified on exit ifEQUED .ne. 'N', and the solution to the equilibrated system isinv(diag(C))*XifTRANS = 'N'andEQUED = 'C'or'B', orinv(diag(R))*XifTRANS = 'T'or'C'andEQUED = 'R'or'B'. Yes bestie, that's a whole lot of conditionals β it's giving equilibration main character energy π .LDXβLDXisINTEGER. It's the leading dimension of the arrayX.LDX >= max(1,N). No exceptions, periodt.RCONDβRCONDisDOUBLE PRECISION. The estimate of the reciprocal condition number of the matrixAafter equilibration (if done). 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βFERRisDOUBLE PRECISIONarray, dimension(NRHS). The estimated forward error bound for each solution vectorX(j)(thej-th column of the solution matrixX). 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. Cute little safety cushion, lowkey π«Ά.BERRβBERRisDOUBLE PRECISIONarray, dimension(NRHS). The componentwise relative backward error of each solution vectorX(j)(i.e., the smallest relative change in any element ofAorBthat makesX(j)an exact solution). That's the "how much would I have to nudge things" vibe fr fr.WORKβWORKisDOUBLE PRECISIONarray, dimension(MAX(1,3*N)). On exit,WORK(1)contains the reciprocal pivot growth factornorm(A)/norm(U). The norm is used. IfWORK(1)is much less than1, then the stability of the LU factorization of the (equilibrated) matrixAcould be poor. This also means that the solutionX, condition estimatorRCOND, and forward error boundFERRcould be unreliable. If factorization fails with0<INFO<=N, thenWORK(1)contains the reciprocal pivot growth factor for the leadingINFOcolumns ofA. Heads up: this is the vibe-check field for your factorization π.IWORKβIWORKisINTEGERarray, dimension(N).INFOβINFOisINTEGER:= 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 been completed, but the factorUis exactly singular, so the solution and error bounds could not be computed.RCOND = 0is returned.= N+1:Uis 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 366 of file dgbsvx.f.
β¨ Author β¨
Generated automatically by Doxygen for LAPACK from the source code.
That's the page, bestie π β footer vibes: LAPACK Version 3.12.0, source /home/abui...RC/dgbsvx.f(3), and the date as it appears in the footer. Byeee ππ
π¦ 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