/home/abui...RC/ssygv.f(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… /home/abui...RC/ssygv.f(3) β€” LAPACK Library Functions Manual, bestie edition ✨

okay so this is a page straight out of the LAPACK Library Functions Manual (the file lives at /home/abui...RC/ssygv.f(3)), and we're about to get very into it. grab a lil snack πŸ“, this is a whole subroutine.


🌸 NAME 🌸

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/ssygv.f

that's it. that's the name. the whole entire path, no notes, no cap. she said "I am my file location" and honestly? iconic. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions/Subroutines

  • subroutine SSYGV (itype, jobz, uplo, n, a, lda, b, ldb, w, work, lwork, info) β€” the queen herself, SSYGV

πŸŽ€ Function/Subroutine Documentation πŸŽ€

subroutine SSYGV (integer itype, character jobz, character uplo, integer n, real, dimension( lda, * ) a, integer lda, real, dimension( ldb, * ) b, integer ldb, real, dimension( * ) w, real, dimension( * ) work, integer lwork, integer info)

SSYGV

πŸ”₯ Purpose πŸ”₯

!>
!> SSYGV computes all the eigenvalues, and optionally, the eigenvectors
!> of a real generalized symmetric-definite eigenproblem, of the form
!> A*x=(lambda)*B*x,  A*Bx=(lambda)*x,  or B*A*x=(lambda)*x.
!> Here A and B are assumed to be symmetric and B is also
!> positive definite.
!>

so basically she does the whole eigenvalue + eigenvector situation for a real generalized symmetric-definite eigenproblem. three possible forms, A and B are both assumed symmetric, and B is also assumed positive definite β€” that part matters, remember it, there will be a vibe check about it later. πŸ’€


✨ Parameters ✨

ITYPE

!>          ITYPE is INTEGER
!>          Specifies the problem type to be solved:
!>          = 1:  A*x = (lambda)*B*x
!>          = 2:  A*B*x = (lambda)*x
!>          = 3:  B*A*x = (lambda)*x
!>

three flavors of problem, pick your fighter. πŸ₯Š

JOBZ

!>          JOBZ is CHARACTER*1
!>          = 'N':  Compute eigenvalues only;
!>          = 'V':  Compute eigenvalues and eigenvectors.
!>

'N' = eigenvalues only, keep it chill. 'V' = eigenvalues and eigenvectors, main character energy, do the most. πŸ’…

UPLO

!>          UPLO is CHARACTER*1
!>          = 'U':  Upper triangles of A and B are stored;
!>          = 'L':  Lower triangles of A and B are stored.
!>

which triangle of A and B you've actually bothered to store. 'U' for upper, 'L' for lower. you do have to pick one, bestie.

N

!>          N is INTEGER
!>          The order of the matrices A and B.  N >= 0.
!>

the order of A and B. and listen: N >= 0. zero is allowed, negative is not, we don't do that here. 🚫

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.  If UPLO = 'L',
!>          the leading N-by-N lower triangular part of A contains
!>          the lower triangular part of the matrix A.
!>
!>          On exit, if JOBZ = 'V', then if INFO = 0, A contains the
!>          matrix Z of eigenvectors.  The eigenvectors are normalized
!>          as follows:
!>          if ITYPE = 1 or 2, Z**T*B*Z = I;
!>          if ITYPE = 3, Z**T*inv(B)*Z = I.
!>          If JOBZ = 'N', then on exit the upper triangle (if UPLO='U')
!>          or the lower triangle (if UPLO='L') of A, including the
!>          diagonal, is destroyed.
!>

okay so on entry this is your symmetric matrix A β€” whichever triangle UPLO told you about.

on exit it's a whole different girl. if JOBZ = 'V' and INFO = 0, A now holds the matrix Z of eigenvectors, normalized like this:

  • if ITYPE = 1 or 2: Z**T*B*Z = I
  • if ITYPE = 3: Z**T*inv(B)*Z = I
⚠️ but if JOBZ = 'N', then on exit the upper triangle (if UPLO='U') or the lower triangle (if UPLO='L') of A β€” including the diagonal β€” is destroyed. gone. reduced to atoms. 😭 your input is NOT safe, do not come crying to me.

LDA

!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,N).
!>

leading dimension of A. LDA >= max(1,N). periodt.

B

!>          B is REAL array, dimension (LDB, N)
!>          On entry, the symmetric positive definite matrix B.
!>          If UPLO = 'U', the leading N-by-N upper triangular part of B
!>          contains the upper triangular part of the matrix B.
!>          If UPLO = 'L', the leading N-by-N lower triangular part of B
!>          contains the lower triangular part of the matrix B.
!>
!>          On exit, if INFO <= N, the part of B containing the matrix is
!>          overwritten by the triangular factor U or L from the Cholesky
!>          factorization B = U**T*U or B = L*L**T.
!>

on entry: the symmetric positive definite matrix B, stored per UPLO ('U' β†’ leading N-by-N upper triangular part, 'L' β†’ leading N-by-N lower triangular part).

on exit: if INFO <= N, the part of B that holds the matrix gets overwritten by the triangular factor U or L from the Cholesky factorization β€” either B = U**T*U or B = L*L**T. so yeah, B gets a whole glow-up too, hope you didn't need the original. 🫢

LDB

!>          LDB is INTEGER
!>          The leading dimension of the array B.  LDB >= max(1,N).
!>

leading dimension of B. LDB >= max(1,N). same rules, different letter.

W

!>          W is REAL array, dimension (N)
!>          If INFO = 0, the eigenvalues in ascending order.
!>

if INFO = 0, this is where the eigenvalues live β€” in ascending order, because she's organized like that. ✨

WORK

!>          WORK is REAL array, dimension (MAX(1,LWORK))
!>          On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
!>

the workspace. on exit, if INFO = 0, then WORK(1) returns the optimal LWORK. she's telling you the ideal size after the fact, love that for you. πŸ’–

LWORK

!>          LWORK is INTEGER
!>          The length of the array WORK.  LWORK >= max(1,3*N-1).
!>          For optimal efficiency, LWORK >= (NB+2)*N,
!>          where NB is the blocksize for SSYTRD returned by ILAENV.
!>
!>          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.
!>

the length of WORK. hard minimum: LWORK >= max(1,3*N-1). for optimal efficiency, though, you want LWORK >= (NB+2)*N, where NB is the blocksize for SSYTRD returned by ILAENV. treat yourself. πŸ’

πŸ‘€ and here's the cute trick: if LWORK = -1, it's a workspace query β€” the routine only calculates the optimal size of the WORK array, returns that value as the first entry of WORK, and XERBLA issues no error message about LWORK. free size estimate, no scolding. 🧚

INFO

!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>          > 0:  SPOTRF or SSYEV returned an error code:
!>             <= N:  if INFO = i, SSYEV failed to converge;
!>                    i off-diagonal elements of an intermediate
!>                    tridiagonal form did not converge to zero;
!>             > N:   if INFO = N + i, for 1 <= i <= N, then the leading
!>                    principal minor of order i of B is not positive.
!>                    The factorization of B could not be completed and
!>                    no eigenvalues or eigenvectors were computed.
!>

the vibe report. πŸ“‹

  • = 0 β†’ successful exit, slay, we're done πŸŽ‰
  • < 0 β†’ if INFO = -i, the i-th argument had an illegal value (you passed something cursed)
  • > 0 β†’ SPOTRF or SSYEV returned an error code:
    • <= N β†’ if INFO = i, SSYEV failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero
    • > N β†’ if INFO = N + i, for 1 <= i <= N, then the leading principal minor of order i of B is not positive. the factorization of B could not be completed and no eigenvalues or eigenvectors were computed. so, like, nothing. zero. nada. 😭 this is the "B wasn't actually positive definite" jump scare, told you it'd come back.

πŸ‘‘ Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

πŸ“ Definition at line 173 of file ssygv.f.


🌈 Author 🌈

Generated automatically by Doxygen for LAPACK from the source code. (yes, a robot wrote this page. a robot with taste. πŸ€–βœ¨)


LAPACK Β· Version 3.12.0 Β· /home/abui...RC/ssygv.f(3) β€” and that's the whole page bestie, go call SSYGV responsibly, mind your LWORK, and please for the love of everything make sure B is actually positive definite πŸ’œπŸ¦‹πŸŒΈπŸŽ€πŸ«Ά

πŸ“¦ where this page comes from