SRC/dgbsvx.f(3)
okay bestie, welcome to the SRC/dgbsvx.f(3) page from the Library Functions Manual β part 1, and it's giving big banded-linear-system energy π
β¨
β¨ NAME β¨
SRC/dgbsvx.f
πΈ 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)
DGBSVX computes the solution to system of linear equations A * X =
B for 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 π
okay so 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. slay π¦
π Description π
The following steps are performed by this subroutine β bestie, this is the whole itinerary π:
- 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,INFO = N+1is returned as a warning, but the routine still goes on to solve forXand compute error bounds as described below. - 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.
- 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 π
okay these are the args, and every single one matters β no skips π
FACTβCHARACTER*1. 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β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(Transpose)
NβINTEGER. The number of linear equations, i.e., the order of the matrixA.N >= 0.KLβINTEGER. The number of subdiagonals within the band ofA.KL >= 0.KUβINTEGER. The number of superdiagonals within the band ofA.KU >= 0.NRHSβINTEGER. The number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.ABβDOUBLE 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βINTEGER. The leading dimension of the arrayAB.LDAB >= KL+KU+1.AFBβDOUBLE PRECISIONarray, dimension(LDAFB,N).
If FACT = 'F', then AFB is an input argument and on entry contains details of the LU factorization of the band matrix A, as computed by DGBTRF. U is stored as an upper triangular band matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and the multipliers used during the factorization are stored in rows KL+KU+2 to 2*KL+KU+1. If EQUED .ne. 'N', then AFB is the factored form of the equilibrated matrix A.
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βINTEGER. The leading dimension of the arrayAFB.LDAFB >= 2*KL+KU+1.IPIVβINTEGERarray, dimension(N).
If FACT = 'F', then IPIV is an input argument and on entry contains the pivot indices from the factorization A = L*U as computed by DGBTRF; row i of the matrix was interchanged with row IPIV(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βCHARACTER*1. 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βDOUBLE 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βDOUBLE 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βDOUBLE PRECISIONarray, dimension(LDB,NRHS). On entry, the right hand side matrixB. On exit, ifEQUED = 'N',Bis not modified; ifTRANS = 'N'andEQUED = 'R'or'B',Bis overwritten bydiag(R)*B; ifTRANS = 'T'or'C'andEQUED = 'C'or'B',Bis overwritten bydiag(C)*B.LDBβINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).Xβ this is where part 1 cuts off, bestie β the rest is coming in part 2 πXβDOUBLE PRECISION array, dimension (LDX,NRHS)</p>. IfINFO = 0orINFO = N+1, this is the N-by-NRHS solution matrixXto the original system of equations. Heads up, bestie:AandBare 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'. πLDXβINTEGER. The leading dimension of the arrayX.LDX >= max(1,N). β¨RCONDβDOUBLE 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βDOUBLE PRECISION array, 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. πBERRβDOUBLE PRECISION array, 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). πWORKβDOUBLE PRECISION array, 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 than 1, 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. πIWORKβINTEGER array, dimension (N). πINFOβINTEGER. The vibe check goes like this:= 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 tea from SRC/dgbsvx.f(3) β LAPACK Version 3.12.0, bestie. Doxygen footer date? It's not shown in this excerpt, but the source/version is right there and it's iconic π
β¨
π¦ 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