hegst(3)
π hegst(3) β Library Functions Manual π
okay bestie, so this is hegst(3) from the Library Functions Manual and it's literally the glow-up page for {he,sy}gst: reduction to standard form β like, four routines that take your generalized eigenproblem and make it standard. iconic behavior tbh β¨
π NAME π
hegst β {he,sy}gst: reduction to standard form π
πΈ SYNOPSIS πΈ
π« Functions π«
subroutine chegst (itype, uplo, n, a, lda, b, ldb, info)
CHEGST
subroutine dsygst (itype, uplo, n, a, lda, b, ldb, info)
DSYGST
subroutine ssygst (itype, uplo, n, a, lda, b, ldb, info)
SSYGST
subroutine zhegst (itype, uplo, n, a, lda, b, ldb, info)
ZHEGST
β¨ Detailed Description β¨
(yeah it's literally just a heading here, no extra tea π΅ β the real lore lives down in the function docs)
π«Ά Function Documentation π«Ά
π subroutine chegst
subroutine chegst (integer itype, character uplo, integer n, complex,
dimension( lda, * ) a, integer lda, complex, dimension( ldb, * ) b,
integer ldb, integer info)
π¦ CHEGST π¦
π Purpose:
CHEGST reduces a complex Hermitian-definite generalized eigenproblem to standard form. π
so like, if ITYPE = 1, the problem is A*x = lambda*B*x, and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H) β¨
if ITYPE = 2 or 3, the problem is A*B*x = lambda*x or B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H*A*L π₯
β οΈ bestie listen βBmust have been previously factorized asU**H*UorL*L**HbyCPOTRF. no cap, do that first or you're gonna have a bad time π
πΈ Parameters
ITYPEβITYPE is INTEGERand it's giving switch statement energy:= 1:computeinv(U**H)*A*inv(U)orinv(L)*A*inv(L**H);= 2 or 3:computeU*A*U**HorL**H*A*L. πUPLOβUPLO is CHARACTER*1:= 'U':Upper triangle ofAis stored andBis factored asU**H*U;= 'L':Lower triangle ofAis stored andBis factored asL*L**H. β¨NβN is INTEGER, the order of the matricesAandB.N >= 0. periodt πAβA is COMPLEX array, dimension (LDA,N). On entry, 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. π¦ On exit, ifINFO = 0, the transformed matrix, stored in the same format asA. β¨LDAβLDA is INTEGER, the leading dimension of the arrayA.LDA >= max(1,N). πBβB is COMPLEX array, dimension (LDB,N), the triangular factor from the Cholesky factorization ofB, as returned byCPOTRF. π heads up:Bis modified by the routine but restored on exit. that's the one detail people always miss, so like, remember it fr fr πLDBβLDB is INTEGER, the leading dimension of the arrayB.LDB >= max(1,N). πINFOβINFO is INTEGER:= 0:successful exit π;< 0:ifINFO = -i, thei-th argument had an illegal value π
π§ Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 127 of file chegst.f.
β subroutine dsygst
subroutine dsygst (integer itype, character uplo, integer n, double
precision, dimension( lda, * ) a, integer lda, double precision,
dimension( ldb, * ) b, integer ldb, integer info)
π¦ DSYGST π¦
π Purpose:
DSYGST reduces a real symmetric-definite generalized eigenproblem to standard form. π
if ITYPE = 1, the problem is A*x = lambda*B*x, and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T) β¨
if ITYPE = 2 or 3, the problem is A*B*x = lambda*x or B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L π₯
β οΈBmust have been previously factorized asU**T*UorL*L**TbyDPOTRF. π literally step one, bestie
πΈ Parameters
ITYPEβITYPE is INTEGER:= 1:computeinv(U**T)*A*inv(U)orinv(L)*A*inv(L**T);= 2 or 3:computeU*A*U**TorL**T*A*L. πUPLOβUPLO is CHARACTER*1:= 'U':Upper triangle ofAis stored andBis factored asU**T*U;= 'L':Lower triangle ofAis stored andBis factored asL*L**T. β¨NβN is INTEGER, the order of the matricesAandB.N >= 0. periodt πAβA is DOUBLE PRECISION array, dimension (LDA,N). On entry, the symmetric 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. π¦ On exit, ifINFO = 0, the transformed matrix, stored in the same format asA. β¨LDAβLDA is INTEGER, the leading dimension of the arrayA.LDA >= max(1,N). πBβB is DOUBLE PRECISION array, dimension (LDB,N), the triangular factor from the Cholesky factorization ofB, as returned byDPOTRF. πLDBβLDB is INTEGER, the leading dimension of the arrayB.LDB >= max(1,N). πΈINFOβINFO is INTEGER:= 0:successful exit π;< 0:ifINFO = -i, thei-th argument had an illegal value π
π§ Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 126 of file dsygst.f.
π subroutine ssygst
subroutine ssygst (integer itype, character uplo, integer n, real,
dimension( lda, * ) a, integer lda, real, dimension( ldb, * ) b, integer
ldb, integer info)
π¦ SSYGST π¦
π Purpose:
SSYGST reduces a real symmetric-definite generalized eigenproblem to standard form. π
if ITYPE = 1, the problem is A*x = lambda*B*x, and A is overwritten by inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T) β¨
if ITYPE = 2 or 3, the problem is A*B*x = lambda*x or B*A*x = lambda*x, and A is overwritten by U*A*U**T or L**T*A*L π₯
β οΈBmust have been previously factorized asU**T*UorL*L**TbySPOTRF. yep,SPOTRFspecifically β single precision girlies stay winning π
πΈ Parameters
ITYPEβITYPE is INTEGER:= 1:computeinv(U**T)*A*inv(U)orinv(L)*A*inv(L**T);= 2 or 3:computeU*A*U**TorL**T*A*L. πUPLOβUPLO is CHARACTER*1:= 'U':Upper triangle ofAis stored andBis factored asU**T*U;= 'L':Lower triangle ofAis stored andBis factored asL*L**T. β¨NβN is INTEGER, the order of the matricesAandB.N >= 0. periodt πAβA is REAL array, dimension (LDA,N). On entry, the symmetric 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. π¦ On exit, ifINFO = 0, the transformed matrix, stored in the same format asA. β¨LDAβLDA is INTEGER, the leading dimension of the arrayA.LDA >= max(1,N). πBβB is REAL array, dimension (LDB,N), the triangular factor from the Cholesky factorization ofB, as returned bySPOTRF. πLDBβLDB is INTEGER, the leading dimension of the arrayB.LDB >= max(1,N). πΈINFOβINFO is INTEGER:= 0:successful exit π;< 0:ifINFO = -i, thei-th argument had an illegal value π
π§ Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 126 of file ssygst.f.
π subroutine zhegst
subroutine zhegst (integer itype, character uplo, integer n, complex*16,
dimension( lda, * ) a, integer lda, complex*16, dimension( ldb, * ) b,
integer ldb, integer info)
π¦ ZHEGST π¦
π Purpose:
ZHEGST reduces a complex Hermitian-definite generalized eigenproblem to standard form. π
if ITYPE = 1, the problem is A*x = lambda*B*x, and A is overwritten by inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H) β¨
if ITYPE = 2 or 3, the problem is A*B*x = lambda*x or B*A*x = lambda*x, and A is overwritten by U*A*U**H or L**H*A*L π₯
β οΈBmust have been previously factorized asU**H*UorL*L**HbyZPOTRF. the double-complex big sister ofCPOTRF, she's iconic π
πΈ Parameters
ITYPEβITYPE is INTEGER:= 1:computeinv(U**H)*A*inv(U)orinv(L)*A*inv(L**H);= 2 or 3:computeU*A*U**HorL**H*A*L. πUPLOβUPLO is CHARACTER*1:= 'U':Upper triangle ofAis stored andBis factored asU**H*U;= 'L':Lower triangle ofAis stored andBis factored asL*L**H. β¨NβN is INTEGER, the order of the matricesAandB.N >= 0. periodt πAβ
π
A β the main character matrix
A is a COMPLEX*16 array, and its dimensions are (LDA,N). Like, remember those? Yeah, they matter.
On entry? A is your Hermitian matrix. Living its truth. But which triangle it lives in depends on UPLO, bestie:
- If
UPLO = 'U', the leadingN-by-Nupper triangular part ofAholds the upper triangular part of the matrixA, and the strictly lower triangular part is not referenced at all. Ignored. Not invited to the party. β¨ - If
UPLO = 'L', it's the flip: the leadingN-by-Nlower triangular part ofAholds the lower triangular part of the matrix, and the strictly upper triangular part is not referenced. Ghosted. π¦
On exit, if INFO = 0, you get the transformed matrix back, stored in the same format as A came in. Same vibe, new content. π
π LDA
LDA is INTEGER, and it's just the leading dimension of the array A. The rule:
LDA >= max(1,N)
That's it. That's the whole job. π
π B β yes she gets modified, no she does not stay modified
B is a COMPLEX*16 array, dimension (LDB,N). She holds the triangular factor from the Cholesky factorization of B, exactly as returned by ZPOTRF. (Shoutout to ZPOTRF, the real one. π«Ά)
Heads up: B is modified by the routine β but it gets restored on exit. So she goes through a whole arc and comes back the same. Character development with zero consequences, honestly iconic.
πΈ LDB
LDB is INTEGER, the leading dimension of the array B, and the requirements are extremely reasonable:
LDB >= max(1,N)
Respect the boundary or catch these hands. π
β INFO β the vibe check at the end
INFO is INTEGER, and here's how to read the tea leaves:
= 0: successful exit. Slay. Everything went great. π< 0: ifINFO = -i, that means thei-th argument had an illegal value. Somebody passed something cursed, and no, it wasn't you, right? Right?? π
π Author
Brought to you by the absolute legends:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
A whole ensemble cast. Main character energy spread across four institutions, fr fr. π
π¦ Definition
Definition at line 127 of file zhegst.f. (Yes, the file says zhegst.f β I'm just the messenger, copy-pasting nothing, respecting everything. π)
π Author (the other one)
Generated automatically by Doxygen for LAPACK from the source code. So like, a robot wrote this. A robot with taste. πβ¨
π And that's the whole page, bestie! This little number isLAPACKVersion 3.12.0,hegst(3)β certified, documented, and now officially understood. Go forth, call your routine, keep your triangles straight, and remember:Bgets modified but she comes back restored. We love a comeback story. π«ΆπΈβ¨
π¦ 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