SRC/dgtsvx.f(3)
π NAME π
SRC/dgtsvx.f β this is the Library Functions Manual page for dgtsvx, bestie. Iconic tridiagonal solver energy.
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine dgtsvx (fact, trans, n, nrhs, dl, d, du, dlf, df, duf, du2,
ipiv, b, ldb, x, ldx, rcond, ferr, berr, work, iwork, info)
DGTSVX computes the solution to system of linear equations A * X =
B for GT matrices
π«Ά Function/Subroutine Documentation π«Ά
subroutine dgtsvx (character fact, character trans, integer n, integer nrhs,
double precision, dimension( * ) dl, double precision, dimension( * ) d,
double precision, dimension( * ) du, double precision, dimension( * )
dlf, double precision, dimension( * ) df, double precision, dimension( *
) duf, double precision, dimension( * ) du2, integer, dimension( * )
ipiv, 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)
DGTSVX computes the solution to system of linear equations A * X = B for GT matrices. Main character subroutine fr fr.
Purpose
Okay so DGTSVX uses the LU factorization to compute the solution to a real system of linear equations A * X = B or A**T * X = B, where A is a tridiagonal matrix of order N and X and B are N-by-NRHS matrices. Error bounds on the solution and a condition estimate are also provided β yes bestie, itβs giving accuracy receipts.
Description
The following steps are performed:
- If
FACT = 'N', the LU decomposition is used to factor the matrixAasA = L * U, whereLis a product of permutation and unit lower bidiagonal matrices andUis upper triangular with nonzeros in only the main diagonal and first two 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.
Parameters
Hereβs every single parameter, and yes, every detail stays. No cap.
FACTβFACTisCHARACTER*1. It specifies whether or not the factored form ofAhas been supplied on entry.= 'F':DLF,DF,DUF,DU2, andIPIVcontain the factored form ofA;DL,D,DU,DLF,DF,DUF,DU2andIPIVwill not be modified.= 'N': the matrix will be copied toDLF,DF, andDUFand 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(Conjugate transpose = Transpose)
NβNisINTEGER. The order of the matrixA.N >= 0.NRHSβNRHSisINTEGER. The number of right hand sides, i.e., the number of columns of the matrixB.NRHS >= 0.DLβDLisDOUBLE PRECISIONarray, dimension(N-1). The(n-1)subdiagonal elements ofA.DβDisDOUBLE PRECISIONarray, dimension(N). Thendiagonal elements ofA.DUβDUisDOUBLE PRECISIONarray, dimension(N-1). The(n-1)superdiagonal elements ofA.DLFβDLFisDOUBLE PRECISIONarray, dimension(N-1). IfFACT = 'F', thenDLFis an input argument and on entry contains the(n-1)multipliers that define the matrixLfrom the LU factorization ofAas computed byDGTTRF. IfFACT = 'N', thenDLFis an output argument and on exit contains the(n-1)multipliers that define the matrixLfrom the LU factorization ofA.DFβDFisDOUBLE PRECISIONarray, dimension(N). IfFACT = 'F', thenDFis an input argument and on entry contains thendiagonal elements of the upper triangular matrixUfrom the LU factorization ofA. IfFACT = 'N', thenDFis an output argument and on exit contains thendiagonal elements of the upper triangular matrixUfrom the LU factorization ofA.DUFβDUFisDOUBLE PRECISIONarray, dimension(N-1). IfFACT = 'F', thenDUFis an input argument and on entry contains the(n-1)elements of the first superdiagonal ofU. IfFACT = 'N', thenDUFis an output argument and on exit contains the(n-1)elements of the first superdiagonal ofU.DU2βDU2isDOUBLE PRECISIONarray, dimension(N-2). IfFACT = 'F', thenDU2is an input argument and on entry contains the(n-2)elements of the second superdiagonal ofU. IfFACT = 'N', thenDU2is an output argument and on exit contains the(n-2)elements of the second superdiagonal ofU.IPIVβIPIVisINTEGERarray, dimension(N). IfFACT = 'F', thenIPIVis an input argument and on entry contains the pivot indices from the LU factorization ofAas computed byDGTTRF. IfFACT = 'N', thenIPIVis an output argument and on exit contains the pivot indices from the LU factorization ofA; 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βBisDOUBLE PRECISIONarray, dimension(LDB,NRHS). TheN-by-NRHSright hand side matrixB.LDBβLDBisINTEGER. The leading dimension of the arrayB.LDB >= max(1,N).XβXisDOUBLE PRECISIONarray, dimension(LDX,NRHS). IfINFO = 0orINFO = N+1, theN-by-NRHSsolution matrixX.LDXβLDXisINTEGER. The leading dimension of the arrayX.LDX >= max(1,N).RCONDβRCONDisDOUBLE PRECISION. The estimate of the reciprocal condition number of the matrixA. 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.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).WORKβWORKisDOUBLE PRECISIONarray, dimension(3*N).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 not been completed unlessi = N, 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 290 of file dgtsvx.f.
ποΈ Author (footer) ποΈ
Generated automatically by Doxygen for LAPACK from the source code.
π Thatβs the whole page, bestie! Itβs LAPACK Version 3.12.0, source SRC/dgtsvx.f(3), and thatβs the vibe check passed. πβ¨π
π¦ 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