SRC/zposvx.f(3)
π¦ SRC/zposvx.f π¦
ok so bestie, welcome to the zposvx.f page from the Library Functions Manual β yes that's the vibe, we're in the library, we're being β¨productiveβ¨, and honestly this one is a whole moment.
πΈ NAME πΈ
SRC/zposvx.f β literally the file, that's the name, no notes π
β¨ SYNOPSIS β¨
π Functions/Subroutines
ok so under here we've got one (1) icon doing all the work, and she is:
subroutine zposvxβ described as ZPOSVX computes the solution to system of linear equations A * X = B for PO matrices π₯
and here's her full signature, copied exactly, do not touch, she is perfect as she is:
subroutine zposvx (fact, uplo, n, nrhs, a, lda, af, ldaf, equed, s, b,
ldb, x, ldx, rcond, ferr, berr, work, rwork, info)
likeβ¦ look at all those arguments. lda, ldaf, ldb, ldx β the lds really said "we're a family and we're showing up together" π«Ά and then rcond, ferr, berr, work, rwork, and info rounding out the group chat at the end. no cap, she's booked and busy π
and what does she do?? she computes the solution to system of linear equations A * X = B for PO matrices β that's the whole flex, that's the entire personality, and honestly? iconic π
π« Function/Subroutine Documentation π«
subroutine zposvx (character fact, character uplo, integer n, integer nrhs,
complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension(
ldaf, * ) af, integer ldaf, character equed, double precision,
dimension( * ) s, 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)
Bestie, ZPOSVX computes the solution to system of linear equations A * X = B for PO matrices. π
πΈ Purpose πΈ
Okay so ZPOSVX uses the Cholesky factorization A = U**H*U or A = L*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 matrix and X and B are N-by-NRHS matrices. β¨
Error bounds on the solution and a condition estimate are also provided. No cap. π«Ά
π¦ Description π¦
The following steps are performed:
- If
FACT = 'E', real scaling factors are computed to equilibrate the system:
diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * 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(S)*A*diag(S) and B by diag(S)*B. π
- If
FACT = 'N'or'E', the Cholesky decomposition is used to factor the matrixA(after equilibration ifFACT = 'E') as
A = U**H* U, if UPLO = 'U', or
A = L * L**H, if UPLO = 'L',
where U is an upper triangular matrix and L is a lower triangular matrix. π¦
- If the leading principal minor of order
iis not positive, 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(S)so that it solves the original system before equilibration. π
π Parameters π
FACTβFACT is 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,AFcontains the factored form ofA. IfEQUED = 'Y', the matrixAhas been equilibrated with scaling factors given byS.AandAFwill not be modified.= 'N': The matrixAwill be copied toAFand factored.= 'E': The matrixAwill be equilibrated if necessary, then copied toAFand factored. π
UPLOβUPLO is CHARACTER*1.= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored. π
NβN is INTEGER. The number of linear equations, i.e., 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. π«ΆAβA is COMPLEX*16 array, dimension (LDA,N). On entry, the Hermitian matrixA, except ifFACT = 'F'andEQUED = 'Y', thenAmust contain the equilibrated matrixdiag(S)*A*diag(S). IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced.Ais not modified ifFACT = 'F'or'N', or ifFACT = 'E'andEQUED = 'N'on exit. On exit, ifFACT = 'E'andEQUED = 'Y',Ais overwritten bydiag(S)*A*diag(S). πΈLDAβLDA is INTEGER. The leading dimension of the arrayA.LDA >= max(1,N). πAFβAF is COMPLEX*16 array, dimension (LDAF,N). IfFACT = 'F', thenAFis an input argument and on entry contains the triangular factorUorLfrom the Cholesky factorizationA = U**H *UorA = L*L**H, in the same storage format asA. IfEQUED .ne. 'N', thenAFis the factored form of the equilibrated matrixdiag(S)*A*diag(S). IfFACT = 'N', thenAFis an output argument and on exit returns the triangular factorUorLfrom the Cholesky factorizationA = U**H *UorA = L*L**Hof the original matrixA. IfFACT = 'E', thenAFis an output argument and on exit returns the triangular factorUorLfrom the Cholesky factorizationA = U**H *UorA = L*L**Hof the equilibrated matrixA(see the description ofAfor the form of the equilibrated matrix). π¦LDAFβLDAF is INTEGER. The leading dimension of the arrayAF.LDAF >= max(1,N). βEQUEDβEQUED is CHARACTER*1. Specifies the form of equilibration that was done.= 'N': No equilibration (always true ifFACT = 'N').= 'Y': Equilibration was done, i.e.,Ahas been replaced bydiag(S) * A * diag(S).EQUEDis an input argument ifFACT = 'F'; otherwise, it is an output argument. π
SβS is DOUBLE PRECISION array, dimension (N). The scale factors forA; not accessed ifEQUED = 'N'.Sis an input argument ifFACT = 'F'; otherwise,Sis an output argument. IfFACT = 'F'andEQUED = 'Y', each element ofSmust be positive. πBβB is COMPLEX*16 array, dimension (LDB,NRHS). On entry, theN-by-NRHSrighthand side matrixB. On exit, ifEQUED = 'N',Bis not modified; ifEQUED = 'Y',Bis overwritten bydiag(S) * B. π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 matrixXto the original system of equations. Note that ifEQUED = 'Y',AandBare modified on exit, and the solution to the equilibrated system isinv(diag(S))*X. β¨LDXβLDX is INTEGER. The leading dimension of the arrayX.LDX >= max(1,N). π«RCONDβRCOND is 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βFERR is 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β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 (2*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. π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Definition at line 303 of file zposvx.f. π
πΈ AUTHOR πΈ
Okay bestie, real talk β nobody hand-wrote this one. It's generated automatically by Doxygen for LAPACK, straight from the source code, zero human fingerprints. So likeβ¦ the "author" is a build tool. And honestly? She ate. π
No cap, that means every word on this page got pulled out of the code itself, so if something looks crunchy and mechanical, that's why β it's giving β¨automationβ¨, not a person lovingly typing at 3 a.m. π«Ά
And that's the whole page, bestie β you made it to the end! π The footer is literally just the glow-up credits: this is SRC/zposvx.f(3) from LAPACK, Version 3.12.0, with the generated-by-Doxygen timestamp doing its little cameo down there. π
Now go forth and zposvx responsibly β you're the main character of this linear algebra journey fr fr. πβ¨π¦
π¦ 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