SRC/zhesvx.f(3)
π NAME π
SRC/zhesvx.f β that's the file, bestie. The header is all SRC/zhesvx.f(3) and Library Functions Manual, so consider it folded in with a little bow on top. π
β¨ SYNOPSIS β¨
π§ Functions/Subroutines
subroutine zhesvxβ the whole signature is right below, exact, no edits:ZHESVX computes the solution to system of linear equations A * X = B for HE matrices.
subroutine zhesvx (fact, uplo, n, nrhs, a, lda, af, ldaf, ipiv, b, ldb,
x, ldx, rcond, ferr, berr, work, lwork, rwork, info)
πΈ FUNCTION/SUBROUTINE DOCUMENTATION πΈ
Full signature, copied exactly because this is not the place to freestyle:
subroutine zhesvx (character fact, character uplo, integer n, integer nrhs,
complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension(
ldaf, * ) af, integer ldaf, integer, dimension( * ) ipiv, 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, integer lwork, double precision, dimension( * ) rwork, integer
info)
ZHESVX computes the solution to system of linear equations A * X = B for HE matrices. That's the one-line vibe check. π
π Purpose π
Okay so ZHESVX uses the diagonal pivoting factorization to compute the solution to a complex system of linear equations A * X = B, where A is an N-by-N Hermitian matrix and X and B are N-by-NRHS matrices.
It also provides error bounds on the solution and a condition estimate. That's the whole mood, no cap. β¨
π¦ Description π¦
The following steps are performed, in this exact order:
- If
FACT = 'N', the diagonal pivoting method is used to factorA. The form of the factorization is:
A = U * D * U**H, if UPLO = 'U', or
A = L * D * L**H, if UPLO = 'L',
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is Hermitian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
- If some
D(i,i)=0, so thatDis 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. Literally the glow-up phase. π
π Parameters π
FACTβFACT is CHARACTER*1. Specifies whether or not the factored form ofAhas been supplied on entry.= 'F': on entry,AFandIPIVcontain the factored form ofA;A,AFandIPIVwill not be modified.= 'N': the matrixAwill be copied toAFand factored. Choose your fighter.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). The Hermitian matrixA. 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.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 block diagonal matrixDand the multipliers used to obtain the factorUorLfrom the factorizationA = U*D*U**HorA = L*D*L**Has computed byZHETRF.
If FACT = 'N', then AF is an output argument and on exit returns the block diagonal matrix D and the multipliers used to obtain the factor U or L from the factorization A = U*D*U**H or A = L*D*L**H. Input-to-output pipeline, iconic.
LDAFβLDAF is INTEGER. The leading dimension of the arrayAF.LDAF >= max(1,N).IPIVβIPIV is INTEGER array, dimension (N). IfFACT = 'F', thenIPIVis an input argument and on entry contains details of the interchanges and the block structure ofD, as determined byZHETRF.
If IPIV(k) > 0, then rows and columns k and IPIV(k) were interchanged and D(k,k) is a 1-by-1 diagonal block.
If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2 diagonal block.
If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
If FACT = 'N', then IPIV is an output argument and on exit contains details of the interchanges and the block structure of D, as determined by ZHETRF. Yes, all those signs and indices matter, bestie.
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. The main character output.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 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 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 (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβLWORK is INTEGER. The length ofWORK.LWORK >= MAX(1,2*N), and for best performance, whenFACT = 'N',LWORK >= MAX(1,2*N,N*NB), whereNBis the optimal blocksize forZHETRF.
If LWORK = -1, then a workspace query is assumed; the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued by XERBLA.
Workspace query mode is not an error, bestie. It's just LWORK = -1 doing its little reconnaissance mission.
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:D(i,i)is exactly zero. The factorization has been completed but the factorDis exactly singular, so the solution and error bounds could not be computed.RCOND = 0is returned.= N+1:Dis 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. Read that last part again, because it's cute and important.
π§ Author π§
Univ. of TennesseeUniv. of California BerkeleyUniv. of Colorado DenverNAG Ltd.
Definition at line 282 of file zhesvx.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code. Not me, I just gave it the vibe check. π
That's the whole SRC/zhesvx.f(3) moment, bestie. The footer energy is LAPACK Version 3.12.0, source SRC/zhesvx.f(3). Periodt. πβ¨
π¦ 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