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 β€” B must have been previously factorized as U**H*U or L*L**H by CPOTRF. no cap, do that first or you're gonna have a bad time 😭

🌸 Parameters

  • ITYPE β€” ITYPE is INTEGER and it's giving switch statement energy: = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H); = 2 or 3: compute U*A*U**H or L**H*A*L. πŸ’…
  • UPLO β€” UPLO is CHARACTER*1: = 'U': Upper triangle of A is stored and B is factored as U**H*U; = 'L': Lower triangle of A is stored and B is factored as L*L**H. ✨
  • N β€” N is INTEGER, the order of the matrices A and B. N >= 0. periodt πŸ’–
  • A β€” A is COMPLEX array, dimension (LDA,N). On entry, the Hermitian matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. πŸ¦‹ On exit, if INFO = 0, the transformed matrix, stored in the same format as A. ✨
  • LDA β€” LDA is INTEGER, the leading dimension of the array A. LDA >= max(1,N). πŸ‘‘
  • B β€” B is COMPLEX array, dimension (LDB,N), the triangular factor from the Cholesky factorization of B, as returned by CPOTRF. πŸ‘€ heads up: B is 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 array B. LDB >= max(1,N). πŸŽ€
  • INFO β€” INFO is INTEGER: = 0: successful exit 🌈; < 0: if INFO = -i, the i-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 πŸ”₯

⚠️ B must have been previously factorized as U**T*U or L*L**T by DPOTRF. πŸ‘ˆ literally step one, bestie

🌸 Parameters

  • ITYPE β€” ITYPE is INTEGER: = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T); = 2 or 3: compute U*A*U**T or L**T*A*L. πŸ’…
  • UPLO β€” UPLO is CHARACTER*1: = 'U': Upper triangle of A is stored and B is factored as U**T*U; = 'L': Lower triangle of A is stored and B is factored as L*L**T. ✨
  • N β€” N is INTEGER, the order of the matrices A and B. N >= 0. periodt πŸ’–
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,N). On entry, the symmetric matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. πŸ¦‹ On exit, if INFO = 0, the transformed matrix, stored in the same format as A. ✨
  • LDA β€” LDA is INTEGER, the leading dimension of the array A. LDA >= max(1,N). πŸ‘‘
  • B β€” B is DOUBLE PRECISION array, dimension (LDB,N), the triangular factor from the Cholesky factorization of B, as returned by DPOTRF. πŸŽ€
  • LDB β€” LDB is INTEGER, the leading dimension of the array B. LDB >= max(1,N). 🌸
  • INFO β€” INFO is INTEGER: = 0: successful exit 🌈; < 0: if INFO = -i, the i-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 πŸ”₯

⚠️ B must have been previously factorized as U**T*U or L*L**T by SPOTRF. yep, SPOTRF specifically β€” single precision girlies stay winning πŸ’…

🌸 Parameters

  • ITYPE β€” ITYPE is INTEGER: = 1: compute inv(U**T)*A*inv(U) or inv(L)*A*inv(L**T); = 2 or 3: compute U*A*U**T or L**T*A*L. πŸ’…
  • UPLO β€” UPLO is CHARACTER*1: = 'U': Upper triangle of A is stored and B is factored as U**T*U; = 'L': Lower triangle of A is stored and B is factored as L*L**T. ✨
  • N β€” N is INTEGER, the order of the matrices A and B. N >= 0. periodt πŸ’–
  • A β€” A is REAL array, dimension (LDA,N). On entry, the symmetric matrix A. If UPLO = 'U', the leading N-by-N upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading N-by-N lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. πŸ¦‹ On exit, if INFO = 0, the transformed matrix, stored in the same format as A. ✨
  • LDA β€” LDA is INTEGER, the leading dimension of the array A. LDA >= max(1,N). πŸ‘‘
  • B β€” B is REAL array, dimension (LDB,N), the triangular factor from the Cholesky factorization of B, as returned by SPOTRF. πŸŽ€
  • LDB β€” LDB is INTEGER, the leading dimension of the array B. LDB >= max(1,N). 🌸
  • INFO β€” INFO is INTEGER: = 0: successful exit 🌈; < 0: if INFO = -i, the i-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 πŸ”₯

⚠️ B must have been previously factorized as U**H*U or L*L**H by ZPOTRF. the double-complex big sister of CPOTRF, she's iconic πŸ‘‘

🌸 Parameters

  • ITYPE β€” ITYPE is INTEGER: = 1: compute inv(U**H)*A*inv(U) or inv(L)*A*inv(L**H); = 2 or 3: compute U*A*U**H or L**H*A*L. πŸ’…
  • UPLO β€” UPLO is CHARACTER*1: = 'U': Upper triangle of A is stored and B is factored as U**H*U; = 'L': Lower triangle of A is stored and B is factored as L*L**H. ✨
  • N β€” N is INTEGER, the order of the matrices A and B. 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 leading N-by-N upper triangular part of A holds the upper triangular part of the matrix A, 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 leading N-by-N lower triangular part of A holds 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: if INFO = -i, that means the i-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 is LAPACK Version 3.12.0, hegst(3) β€” certified, documented, and now officially understood. Go forth, call your routine, keep your triangles straight, and remember: B gets modified but she comes back restored. We love a comeback story. 🫢🌸✨
πŸ“¦ where this page comes from