SGGEVX(3)

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

πŸ¦‹ sggevx.f(3) β€” Library Functions Manual πŸ¦‹

okay so real talk: this is the manual page for /home/abui...RC/sggevx.f(3), and the manual it lives in is literally called Library Functions Manual. that's the whole top-of-page situation, bestie. now let's get into it πŸ’…


✨ NAME ✨

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

yes. that's the name. it's a file path. we love a low-effort NAME section, no cap πŸŽ€


🌸 SYNOPSIS 🌸

Functions/Subroutines

subroutine SGGEVX (balanc, jobvl, jobvr, sense, n, a, lda, b, ldb,
    alphar, alphai, beta, vl, ldvl, vr, ldvr, ilo, ihi, lscale, rscale,
    abnrm, bbnrm, rconde, rcondv, work, lwork, iwork, bwork, info)
     SGGEVX computes the eigenvalues and, optionally, the left and/or
    right eigenvectors for GE matrices

like, she's the whole cast list. 29 arguments. main character energy fr fr πŸ‘‘


πŸ’– Function/Subroutine Documentation πŸ’–

subroutine SGGEVX

subroutine SGGEVX (character balanc, character jobvl, character jobvr,
    character sense, integer n, real, dimension( lda, * ) a, integer lda,
    real, dimension( ldb, * ) b, integer ldb, real, dimension( * ) alphar,
    real, dimension( * ) alphai, real, dimension( * ) beta, real, dimension(
    ldvl, * ) vl, integer ldvl, real, dimension( ldvr, * ) vr, integer ldvr,
    integer ilo, integer ihi, real, dimension( * ) lscale, real, dimension(
    * ) rscale, real abnrm, real bbnrm, real, dimension( * ) rconde, real,
    dimension( * ) rcondv, real, dimension( * ) work, integer lwork,
    integer, dimension( * ) iwork, logical, dimension( * ) bwork, integer
    info)

SGGEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for GE matrices ✨


🎯 PURPOSE 🎯

okay so here's the vibe: SGGEVX computes, for a pair of N-by-N real nonsymmetric matrices (A,B), the generalized eigenvalues β€” and optionally the left and/or right generalized eigenvectors. πŸ¦‹

it can also optionally compute a balancing transformation to improve the conditioning of the eigenvalues and eigenvectors (ILO, IHI, LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for the eigenvalues (RCONDE), and reciprocal condition numbers for the right eigenvectors (RCONDV). she does it all, honestly πŸ’…

a generalized eigenvalue for a pair of matrices (A,B) is a scalar lambda or a ratio alpha/beta = lambda, such that A - lambda*B is singular. it's usually represented as the pair (alpha,beta), because there's a reasonable interpretation for beta=0, and even for both being zero. yes, both. we said what we said πŸ™ˆ

the right eigenvector v(j) corresponding to the eigenvalue lambda(j) of (A,B) satisfies

                 A * v(j) = lambda(j) * B * v(j) .

the left eigenvector u(j) corresponding to the eigenvalue lambda(j) of (A,B) satisfies

                 u(j)**H * A  = lambda(j) * u(j)**H * B.

where u(j)**H is the conjugate-transpose of u(j). math is slaying today, we love to see it ⭐


🌈 Parameters 🌈

bestie there are so many. every single one is here. hydrate before reading πŸ’§

  • BALANC β€” CHARACTER*1. specifies the balance option to be performed.
    • = 'N': do not diagonally scale or permute;
    • = 'P': permute only;
    • = 'S': scale only;
    • = 'B': both permute and scale.
    • computed reciprocal condition numbers will be for the matrices after permuting and/or balancing. permuting does not change condition numbers (in exact arithmetic), but balancing does. noted, bestie πŸ“
  • JOBVL β€” CHARACTER*1.
    • = 'N': do not compute the left generalized eigenvectors;
    • = 'V': compute the left generalized eigenvectors.
  • JOBVR β€” CHARACTER*1.
    • = 'N': do not compute the right generalized eigenvectors;
    • = 'V': compute the right generalized eigenvectors.
  • SENSE β€” CHARACTER*1. determines which reciprocal condition numbers are computed.
    • = 'N': none are computed;
    • = 'E': computed for eigenvalues only;
    • = 'V': computed for eigenvectors only;
    • = 'B': computed for eigenvalues and eigenvectors.
  • N β€” INTEGER. the order of the matrices A, B, VL, and VR. N >= 0.
  • A β€” REAL array, dimension (LDA, N). on entry, the matrix A in the pair (A,B). on exit, A has been overwritten. if JOBVL='V' or JOBVR='V' or both, then A contains the first part of the real Schur form of the versions of the input A and B.
  • LDA β€” INTEGER. the leading dimension of A. LDA >= max(1,N).
  • B β€” REAL array, dimension (LDB, N). on entry, the matrix B in the pair (A,B). on exit, B has been overwritten. if JOBVL='V' or JOBVR='V' or both, then B contains the second part of the real Schur form of the versions of the input A and B.
  • LDB β€” INTEGER. the leading dimension of B. LDB >= max(1,N).
  • ALPHAR β€” REAL array, dimension (N).
  • ALPHAI β€” REAL array, dimension (N).
  • BETA β€” REAL array, dimension (N). on exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will be the generalized eigenvalues. if ALPHAI(j) is zero, then the j-th eigenvalue is real; if positive, then the j-th and (j+1)-st eigenvalues are a complex conjugate pair, with ALPHAI(j+1) negative.
    • > ⚠️ note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j) may easily over- or underflow, and BETA(j) may even be zero. so like… the user should avoid naively computing the ratio ALPHA/BETA. do not do the naive thing, i'm begging 😭 however, ALPHAR and ALPHAI will be always less than and usually comparable with norm(A) in magnitude, and BETA always less than and usually comparable with norm(B).
  • VL β€” REAL array, dimension (LDVL,N). if JOBVL = 'V', the left eigenvectors u(j) are stored one after another in the columns of VL, in the same order as their eigenvalues. if the j-th eigenvalue is real, then u(j) = VL(:,j), the j-th column of VL. if the j-th and (j+1)-th eigenvalues form a complex conjugate pair, then u(j) = VL(:,j)+i*VL(:,j+1) and u(j+1) = VL(:,j)-i*VL(:,j+1). each eigenvector will be scaled so the largest component have abs(real part) + abs(imag. part) = 1. not referenced if JOBVL = 'N'.
  • LDVL β€” INTEGER. the leading dimension of the matrix VL. LDVL >= 1, and if JOBVL = 'V', LDVL >= N.
  • VR β€” REAL array, dimension (LDVR,N). if JOBVR = 'V', the right eigenvectors v(j) are stored one after another in the columns of VR, in the same order as their eigenvalues. if the j-th eigenvalue is real, then v(j) = VR(:,j), the j-th column of VR. if the j-th and (j+1)-th eigenvalues form a complex conjugate pair, then v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1). each eigenvector will be scaled so the largest component have abs(real part) + abs(imag. part) = 1. not referenced if JOBVR = 'N'.
  • LDVR β€” INTEGER. the leading dimension of the matrix VR. LDVR >= 1, and if JOBVR = 'V', LDVR >= N.
  • ILO β€” INTEGER. (the deets live with IHI, keep scrolling 🫢)
  • IHI β€” INTEGER. ILO and IHI are integer values such that on exit A(i,j) = 0 and B(i,j) = 0 if i > j and j = 1,...,ILO-1 or i = IHI+1,...,N. if BALANC = 'N' or 'S', ILO = 1 and IHI = N.
  • LSCALE β€” REAL array, dimension (N). details of the permutations and scaling factors applied to the left side of A and B. if PL(j) is the index of the row interchanged with row j, and DL(j) is the scaling factor applied to row j, then
  LSCALE(j) = PL(j)  for j = 1,...,ILO-1
            = DL(j)  for j = ILO,...,IHI
            = PL(j)  for j = IHI+1,...,N.

the order in which the interchanges are made is N to IHI+1, then 1 to ILO-1.

  • RSCALE β€” REAL array, dimension (N). details of the permutations and scaling factors applied to the right side of A and B. if PR(j) is the index of the column interchanged with column j, and DR(j) is the scaling factor applied to column j, then
  RSCALE(j) = PR(j)  for j = 1,...,ILO-1
            = DR(j)  for j = ILO,...,IHI
            = PR(j)  for j = IHI+1,...,N

the order in which the interchanges are made is N to IHI+1, then 1 to ILO-1.

  • ABNRM β€” REAL. the one-norm of the balanced matrix A. norm girlies rise 🧚
  • BBNRM β€” REAL. the one-norm of the balanced matrix B.
  • RCONDE β€” REAL array, dimension (N). if SENSE = 'E' or 'B', the reciprocal condition numbers of the eigenvalues, stored in consecutive elements of the array. for a complex conjugate pair of eigenvalues two consecutive elements of RCONDE are set to the same value. thus RCONDE(j), RCONDV(j), and the j-th columns of VL and VR all correspond to the j-th eigenpair. if SENSE = 'N' or 'V', RCONDE is not referenced.

πŸ’€ RCONDV

(bestie we are SO not done β€” part 2 picks this up right here, don't move πŸ’–)

RCONDV πŸ’…

RCONDV is a REAL array, dimension (N).

If SENSE = 'V' or 'B', this is where the estimated reciprocal condition numbers of the eigenvectors live β€” stored in consecutive elements of the array. For a complex eigenvector, two consecutive elements of RCONDV are set to the same value. If the eigenvalues cannot be reordered to compute RCONDV(j), then RCONDV(j) is set to 0; this can only occur when the true value would be very small anyway. (So it's giving "we tried, but the number was too tiny to care." πŸ’€)

If SENSE = 'N' or 'E', RCONDV is not referenced. Periodt.


WORK

WORK is a REAL array, dimension (MAX(1,LWORK)).

On exit, if INFO = 0, WORK(1) returns the optimal LWORK. Slay β€” it tells you how much room it actually wanted. ✨


LWORK

LWORK is INTEGER.

It's the dimension of the array WORK. The requirements are:

  • LWORK >= max(1,2*N).
  • If BALANC = 'S' or 'B', or JOBVL = 'V', or JOBVR = 'V', then LWORK >= max(1,6*N).
  • If SENSE = 'E', then LWORK >= max(1,10*N).
  • If SENSE = 'V' or 'B', then LWORK >= 2*N*N+8*N+16.

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. So -1 is basically the "bestie, just tell me how much space I need" move. 🫢


IWORK

IWORK is an INTEGER array, dimension (N+6).

If SENSE = 'E', IWORK is not referenced. No cap.


BWORK

BWORK is a LOGICAL array, dimension (N).

If SENSE = 'N', BWORK is not referenced. That's the vibe check β€” if you don't need it, it's not invited. πŸ’…


INFO

INFO is INTEGER.

  • = 0: successful exit. πŸŽ‰ iconic.
  • < 0: if INFO = -i, the i-th argument had an illegal value.
  • = 1,...,N: The QZ iteration failed. No eigenvectors have been calculated, but ALPHAR(j), ALPHAI(j), and BETA(j) should be correct for j=INFO+1,...,N.
  • > N:
    • =N+1: other than QZ iteration failed in SHGEQZ.
    • =N+2: error return from STGEVC.

Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


Further Details:

Balancing a matrix pair (A,B) includes, first, permuting rows and columns to isolate eigenvalues, second, applying diagonal similarity transformation to the rows and columns to make the rows and columns as close in norm as possible. The computed reciprocal condition numbers correspond to the balanced matrix. Permuting rows and columns will not change the condition numbers (in exact arithmetic) but diagonal scaling will. For further explanation of balancing, see section 4.11.1.2 of LAPACK Users' Guide. πŸ“š (iykyk)

An approximate error bound on the chordal distance between the i-th computed generalized eigenvalue w and the corresponding exact eigenvalue lambda is:

chord(w, lambda) <= EPS * norm(ABNRM, BBNRM) / RCONDE(I)

An approximate error bound for the angle between the i-th computed eigenvector VL(i) or VR(i) is given by:

EPS * norm(ABNRM, BBNRM) / DIF(i).

For further explanation of the reciprocal condition numbers RCONDE and RCONDV, see section 4.11 of LAPACK User's Guide.


Definition at line 387 of file sggevx.f.


Author 🫢 (the Doxygen one)

Generated automatically by Doxygen for LAPACK from the source code.


And that's the whole page, bestie. This masterpiece is from LAPACK Version 3.12.0, source /home/abui...RC/sggevx.f(3) β€” the footer didn't hand us a date, so we're just gonna vibe with the version and the file path. No cap, that's the tea. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from