SRC/zptsvx.f(3)
π¦ NAME π¦
ok so this is SRC/zptsvx.f β yes bestie, it's a Library Functions Manual page, and it's literally the whole file. we stan a self-titled icon π
β¨ SYNOPSIS β¨
π Functions/Subroutines
subroutine zptsvx (fact, n, nrhs, d, e, df, ef, b, ldb, x, ldx, rcond,
ferr, berr, work, rwork, info)
ZPTSVX computes the solution to system of linear equations A * X =
B for PT matrices
like, that's the whole vibe. it solves A * X = B for PT matrices, no big deal π«Ά
π Function/Subroutine Documentation π
subroutine zptsvx (character fact, integer n, integer nrhs, double
precision, dimension( * ) d, complex*16, dimension( * ) e, double
precision, dimension( * ) df, complex*16, dimension( * ) ef, complex*16,
dimension( ldb, * ) b, integer ldb, complex*16, dimension( ldx, * ) x,
integer ldx, double precision rcond, double precision, dimension( * )
ferr, double precision, dimension( * ) berr, complex*16, dimension( * )
work, double precision, dimension( * ) rwork, integer info)
ZPTSVX computes the solution to system of linear equations A * X = B for PT matrices. periodt. π₯
πΈ Purpose πΈ
fortran !> !> ZPTSVX uses the factorization A = L*D*L**H to compute the solution !> to a complex system of linear equations A*X = B, where A is an !> N-by-N Hermitian positive definite tridiagonal matrix and X and B !> are N-by-NRHS matrices. !> !> Error bounds on the solution and a condition estimate are also !> provided. !>
so it takes your Hermitian positive definite tridiagonal matrix A and your N-by-NRHS matrices X and B, factorizes with A = L*D*L**H, solves the system, and also hands you error bounds plus a condition estimate. it's giving overachiever, honestly π
π§ Description π§
fortran !> !> The following steps are performed: !> !> 1. If FACT = 'N', the matrix A is factored as A = L*D*L**H, where L !> is a unit lower bidiagonal matrix and D is diagonal. The !> factorization can also be regarded as having the form !> A = U**H*D*U. !> !> 2. If the leading principal minor of order i is not positive, !> then the routine returns with INFO = 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+1 is returned as a warning, but the routine !> still goes on to solve for X and compute error bounds as !> described below. !> !> 3. The system of equations is solved for X using the factored form !> of A. !> !> 4. Iterative refinement is applied to improve the computed solution !> matrix and calculate error bounds and backward error estimates !> for it. !>
ok so the steps, bestie, in order:
- if
FACT = 'N',Agets factored asA = L*D*L**H, whereLis a unit lower bidiagonal matrix andDis diagonal. and fun fact: you can also clock the factorization asA = U**H*D*U. - if the leading principal minor of order
iis not positive, the routine bounces withINFO = i. otherwise the factored form ofAis used to estimate the condition number ofA. if the reciprocal of the condition number is less than machine precision,INFO = N+1comes back as a warning β but it still goes on to solve forXand compute error bounds like described below. not a quitter πͺ - the system of equations gets solved for
Xusing the factored form ofA. - iterative refinement gets applied to improve the computed solution matrix and calculate error bounds and backward error estimates for it. glow-up behavior β¨
π Parameters π
FACTβFACT is CHARACTER*1, specifies whether or not the factored form of the matrixAis supplied on entry. options are:= 'F': on entry,DFandEFcontain the factored form ofA.D,E,DF, andEFwill not be modified.= 'N': the matrixAwill be copied toDFandEFand factored.
NβN is INTEGER, the order of the matrixA.N >= 0.NRHSβNRHS is INTEGER, the number of right hand sides, i.e., the number of columns of the matricesBandX.NRHS >= 0.DβD is DOUBLE PRECISION array, dimension (N), thendiagonal elements of the tridiagonal matrixA.EβE is COMPLEX*16 array, dimension (N-1), the(n-1)subdiagonal elements of the tridiagonal matrixA.DFβDF is DOUBLE PRECISION array, dimension (N). ifFACT = 'F', thenDFis an input argument and on entry contains thendiagonal elements of the diagonal matrixDfrom theL*D*L**Hfactorization ofA. ifFACT = 'N', thenDFis an output argument and on exit contains thendiagonal elements of the diagonal matrixDfrom theL*D*L**Hfactorization ofA. she switches roles depending on the situation, main character energy fr πEFβEF is COMPLEX*16 array, dimension (N-1). ifFACT = 'F', thenEFis an input argument and on entry contains the(n-1)subdiagonal elements of the unit bidiagonal factorLfrom theL*D*L**Hfactorization ofA. ifFACT = 'N', thenEFis an output argument and on exit contains the(n-1)subdiagonal elements of the unit bidiagonal factorLfrom theL*D*L**Hfactorization ofA.BβB is COMPLEX*16 array, dimension (LDB,NRHS), theN-by-NRHSright hand side matrixB.LDBβLDB is INTEGER, the leading dimension of the arrayB.LDB >= max(1,N).XβX is COMPLEX*16 array, dimension (LDX,NRHS). ifINFO = 0orINFO = N+1, theN-by-NRHSsolution matrixX. πLDXβLDX is INTEGER, the leading dimension of the arrayX.LDX >= max(1,N).RCONDβRCOND is DOUBLE PRECISION, 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βFERR is DOUBLE PRECISION array, dimension (NRHS), the 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).BERRβBERR is 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βWORK is COMPLEX*16 array, dimension (N).RWORKβRWORK is DOUBLE PRECISION array, dimension (N).INFOβINFO is INTEGER:= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i, andiis<= N: the leading principal minor of orderiofAis not positive, so the factorization could not be completed, and the solution has not been 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.
ngl that INFO = N+1 case is lowkey iconic β the matrix is technically singular to working precision but the routine still shows up and does the work anyway ππ«Ά
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
β Definition β
definition at line 232 of file zptsvx.f. iykyk π
π Author π
generated automatically by Doxygen for LAPACK from the source code. not me being auto-generated and still serving looks πβ¨
and that's the page, bestie! shoutout to LAPACK, Version 3.12.0, and the file formerly known as SRC/zptsvx.f(3) β this has been your girl, signing off ππ¦πΈ
π¦ 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