hbevx(3)

๐ŸŽ€ hbevx โ€” {hb,sb}evx: eig, bisection ๐ŸŽ€

okay bestie, this is hbevx(3) from the Library Functions Manual โ€” the LAPACK corner of the library-calls universe ๐Ÿ’– and it's literally four Fortran subroutines that all do the same iconic thing for four different data types. eigenvalues, eigenvectors, band matrices, bisection, the whole vibe. let's get into it โœจ


โœจ NAME โœจ

hbevx โ€” {hb,sb}evx: eig, bisection


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

๐Ÿ“š Functions

  • subroutine chbevx (jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info) โ€” CHBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
  • subroutine dsbevx (jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) โ€” DSBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
  • subroutine ssbevx (jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info) โ€” SSBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
  • subroutine zhbevx (jobz, range, uplo, n, kd, ab, ldab, q, ldq, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info) โ€” ZHBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices
๐Ÿ‘€ notice how chbevx and zhbevx (the complex ones) carry an extra rwork argument, and the real ones dsbevx / ssbevx don't. that's not a typo, that's just how they roll ๐Ÿ’…

๐Ÿ’ซ Detailed Description ๐Ÿ’ซ

ngl, this section is basically an empty room with a sign pointing downstairs ๐Ÿซถ all the actual deets live in the Function Documentation right below โ€” no cap, that's the whole section.


๐Ÿ”ฅ Function Documentation ๐Ÿ”ฅ

๐ŸŒธ subroutine chbevx ๐ŸŒธ

subroutine chbevx (character jobz, character range, character uplo, integer
    n, integer kd, complex, dimension( ldab, * ) ab, integer ldab, complex,
    dimension( ldq, * ) q, integer ldq, real vl, real vu, integer il,
    integer iu, real abstol, integer m, real, dimension( * ) w, complex,
    dimension( ldz, * ) z, integer ldz, complex, dimension( * ) work, real,
    dimension( * ) rwork, integer, dimension( * ) iwork, integer, dimension(
    * ) ifail, integer info)

CHBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices ๐Ÿ˜คโœจ

๐ŸŽฏ Purpose

okay so CHBEVX computes selected eigenvalues and, optionally, eigenvectors of a complex Hermitian band matrix A ๐Ÿ’œ. and the fun part? you get to pick which ones โ€” either by giving it a range of values, or a range of indices. choose your own adventure, but make it linear algebra ๐Ÿ”ฅ

๐Ÿงพ Parameters

  • JOBZ โ€” JOBZ is CHARACTER*1
    • = 'N': Compute eigenvalues only;
    • = 'V': Compute eigenvalues and eigenvectors.
  • RANGE โ€” RANGE is CHARACTER*1
    • = 'A': all eigenvalues will be found;
    • = 'V': all eigenvalues in the half-open interval (VL,VU] will be found;
    • = 'I': the IL-th through IU-th eigenvalues will be found.
  • UPLO โ€” UPLO is CHARACTER*1
    • = 'U': Upper triangle of A is stored;
    • = 'L': Lower triangle of A is stored.
  • N โ€” N is INTEGER. The order of the matrix A. N >= 0.
  • KD โ€” KD is INTEGER. The number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KD >= 0.
  • AB โ€” AB is COMPLEX array, dimension (LDAB, N). On entry, the upper or lower triangle of the Hermitian band matrix A, stored in the first KD+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
    • if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
    • if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).
    • On exit, AB is overwritten by values generated during the reduction to tridiagonal form ๐Ÿ’€ (bestie, your input array is not surviving this).
  • LDAB โ€” LDAB is INTEGER. The leading dimension of the array AB. LDAB >= KD + 1.
  • Q โ€” Q is COMPLEX array, dimension (LDQ, N)
    • If JOBZ = 'V', the N-by-N unitary matrix used in the reduction to tridiagonal form.
    • If JOBZ = 'N', the array Q is not referenced ๐Ÿ™ˆ
  • LDQ โ€” LDQ is INTEGER. The leading dimension of the array Q. If JOBZ = 'V', then LDQ >= max(1,N).
  • VL โ€” VL is REAL. If RANGE='V', the lower bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = 'A' or 'I'.
  • VU โ€” VU is REAL. If RANGE='V', the upper bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = 'A' or 'I'.
  • IL โ€” IL is INTEGER. If RANGE='I', the index of the smallest eigenvalue to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = 'A' or 'V'.
  • IU โ€” IU is INTEGER. If RANGE='I', the index of the largest eigenvalue to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = 'A' or 'V'.
  • ABSTOL โ€” ABSTOL is REAL. The absolute error tolerance for the eigenvalues ๐ŸŽฏ An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to
ABSTOL + EPS *   max( |a|,|b| ) ,

where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing AB to tridiagonal form.

Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*SLAMCH('S'), not zero โš ๏ธ If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*SLAMCH('S').

Also: see by Demmel and Kahan, LAPACK Working Note #3 ๐Ÿ“– iconic reading tbh.

  • M โ€” M is INTEGER. The total number of eigenvalues found. 0 <= M <= N. If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
  • W โ€” W is REAL array, dimension (N). The first M elements contain the selected eigenvalues in ascending order โฌ†๏ธโœจ
  • Z โ€” Z is COMPLEX array, dimension (LDZ, max(1,M))
    • If JOBZ = 'V', then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i).
    • If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL.
    • If JOBZ = 'N', then Z is not referenced.
    • โš ๏ธ Note: the user must ensure that at least max(1,M) columns are supplied in the array Z; if RANGE = 'V', the exact value of M is not known in advance and an upper bound must be used. plan accordingly bestie ๐Ÿ™
  • LDZ โ€” LDZ is INTEGER. The leading dimension of the array Z. LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N).
  • WORK โ€” WORK is COMPLEX array, dimension (N) ๐Ÿ› ๏ธ
  • RWORK โ€” RWORK is REAL array, dimension (7*N)
  • IWORK โ€” IWORK is INTEGER array, dimension (5*N)
  • IFAIL โ€” IFAIL is INTEGER array, dimension (N)
    • If JOBZ = 'V', then if INFO = 0, the first M elements of IFAIL are zero.
    • If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge ๐Ÿ˜ญ
    • If JOBZ = 'N', then IFAIL is not referenced.
  • INFO โ€” INFO is INTEGER
    • = 0: successful exit ๐ŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value ๐Ÿšจ
    • > 0: if INFO = i, then i eigenvectors failed to converge. Their indices are stored in array IFAIL.

โœ๏ธ Author

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

Definition at line 264 of file chbevx.f. ๐Ÿซถ


๐ŸŒธ subroutine dsbevx ๐ŸŒธ

subroutine dsbevx (character jobz, character range, character uplo, integer
    n, integer kd, double precision, dimension( ldab, * ) ab, integer ldab,
    double precision, dimension( ldq, * ) q, integer ldq, double precision
    vl, double precision vu, integer il, integer iu, double precision
    abstol, integer m, double precision, dimension( * ) w, double precision,
    dimension( ldz, * ) z, integer ldz, double precision, dimension( * )
    work, integer, dimension( * ) iwork, integer, dimension( * ) ifail,
    integer info)

DSBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices ๐Ÿ’™

๐ŸŽฏ Purpose

DSBEVX computes selected eigenvalues and, optionally, eigenvectors of a real symmetric band matrix A โœจ Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues โ€” same choose-your-own-adventure energy, just with DOUBLE PRECISION this time ๐Ÿ”ฅ

๐Ÿงพ Parameters

  • JOBZ โ€” JOBZ is CHARACTER*1
    • = 'N': Compute eigenvalues only;
    • = 'V': Compute eigenvalues and eigenvectors.
  • RANGE โ€” RANGE is CHARACTER*1
    • = 'A': all eigenvalues will be found;
    • = 'V': all eigenvalues in the half-open interval (VL,VU] will be found;
    • = 'I': the IL-th through IU-th eigenvalues will be found.
  • UPLO โ€” UPLO is CHARACTER*1
    • = 'U': Upper triangle of A is stored;
    • = 'L': Lower triangle of A is stored.
  • N โ€” N is INTEGER. The order of the matrix A. N >= 0.
  • KD โ€” (and this is literally where part 1 of the page runs out bestie ๐Ÿ˜ญ the KD deets โ€” and everything after โ€” are coming in the next part, hold that thought ๐Ÿซถ)
  • KD โ€” KD is INTEGER. It's the number of superdiagonals if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. Constraint: KD >= 0. No negatives, bestie. ๐Ÿ’…
  • AB โ€” AB is DOUBLE PRECISION array, dimension (LDAB, N). On entry, this holds the upper or lower triangle of the symmetric band matrix A, stored in the first KD+1 rows. The j-th column of A lives in the j-th column of AB like this:
    • if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
    • if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).

On exit, AB gets overwritten by values generated during the reduction to tridiagonal form. If UPLO = 'U', the first superdiagonal and the diagonal of the tridiagonal matrix T are returned in rows KD and KD+1 of AB. If UPLO = 'L', the diagonal and first subdiagonal of T are returned in the first two rows of AB. So yeah, it's a glow-up, not a storage unit. โœจ

  • LDAB โ€” LDAB is INTEGER. The leading dimension of the array AB. Constraint: LDAB >= KD + 1. Respect the leading dimension, periodt.
  • Q โ€” Q is DOUBLE PRECISION array, dimension (LDQ, N). If JOBZ = 'V', this is the N-by-N orthogonal matrix used in the reduction to tridiagonal form. If JOBZ = 'N', the array Q is not referenced. She's only on stage when invited. ๐ŸŽ€
  • LDQ โ€” LDQ is INTEGER. The leading dimension of the array Q. If JOBZ = 'V', then LDQ >= max(1,N).
  • VL โ€” VL is DOUBLE PRECISION. If RANGE='V', this is the lower bound of the interval to be searched for eigenvalues. Constraint: VL < VU. Not referenced if RANGE = 'A' or 'I'.
  • VU โ€” VU is DOUBLE PRECISION. If RANGE='V', this is the upper bound of the interval to be searched for eigenvalues. Constraint: VL < VU. Not referenced if RANGE = 'A' or 'I'.
  • IL โ€” IL is INTEGER. If RANGE='I', this is the index of the smallest eigenvalue to be returned. Constraint: 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = 'A' or 'V'.
  • IU โ€” IU is INTEGER. If RANGE='I', this is the index of the largest eigenvalue to be returned. Constraint: 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = 'A' or 'V'.
  • ABSTOL โ€” ABSTOL is DOUBLE PRECISION. The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it's determined to lie in an interval [a,b] of width less than or equal to
ABSTOL + EPS *   max( |a|,|b| ) ,

where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing AB to tridiagonal form. ๐Ÿ”ฅ

Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*DLAMCH('S'), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*DLAMCH('S'). See [by Demmel and Kahan, LAPACK Working Note #3] โ€” yes, the note is right there in the original, bestie. ๐Ÿ’€

  • M โ€” M is INTEGER. The total number of eigenvalues found. Constraint: 0 <= M <= N. If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1. She's counting, not guessing. ๐Ÿงฎ
  • W โ€” W is DOUBLE PRECISION array, dimension (N). The first M elements contain the selected eigenvalues in ascending order. Sorted, slayed, ascending. ๐Ÿ‘‘
  • Z โ€” Z is DOUBLE PRECISION array, dimension (LDZ, max(1,M)). If JOBZ = 'V', then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i). If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL. If JOBZ = 'N', then Z is not referenced.
โš ๏ธ Note: the user must ensure that at least max(1,M) columns are supplied in the array Z. If RANGE = 'V', the exact value of M is not known in advance and an upper bound must be used. Don't play yourself. ๐Ÿ™ˆ
  • LDZ โ€” LDZ is INTEGER. The leading dimension of the array Z. Constraint: LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N).
  • WORK โ€” WORK is DOUBLE PRECISION array, dimension (7*N).
  • IWORK โ€” IWORK is INTEGER array, dimension (5*N).
  • IFAIL โ€” IFAIL is INTEGER array, dimension (N). If JOBZ = 'V', then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge. If JOBZ = 'N', then IFAIL is not referenced.
  • INFO โ€” INFO is INTEGER:
    • = 0: successful exit. ๐ŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value. You passed something cursed, bestie. ๐Ÿ˜ญ
    • > 0: if INFO = i, then i eigenvectors failed to converge. Their indices are stored in array IFAIL. Not every icon makes it, but the info is there. ๐Ÿ’…

๐ŸŒธ Author

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

Definition at line 262 of file dsbevx.f.


๐Ÿฆ‹ subroutine ssbevx

subroutine ssbevx (character jobz, character range, character uplo, integer
    n, integer kd, real, dimension( ldab, * ) ab, integer ldab, real,
    dimension( ldq, * ) q, integer ldq, real vl, real vu, integer il,
    integer iu, real abstol, integer m, real, dimension( * ) w, real,
    dimension( ldz, * ) z, integer ldz, real, dimension( * ) work, integer,
    dimension( * ) iwork, integer, dimension( * ) ifail, integer info)

SSBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices. Yes, "OTHER" in all caps, she's mysterious like that. ๐Ÿ•ถ๏ธ

โœจ Purpose

!> !> SSBEVX computes selected eigenvalues and, optionally, eigenvectors !> of a real symmetric band matrix A. Eigenvalues and eigenvectors can !> be selected by specifying either a range of values or a range of !> indices for the desired eigenvalues. !>

๐Ÿ’– Parameters

  • JOBZ โ€” JOBZ is CHARACTER*1:
    • = 'N': Compute eigenvalues only;
    • = 'V': Compute eigenvalues and eigenvectors.

Pick your fighter. ๐Ÿ’…

  • RANGE โ€” RANGE is CHARACTER*1:
    • = 'A': all eigenvalues will be found;
    • = 'V': all eigenvalues in the half-open interval (VL,VU] will be found;
    • = 'I': the IL-th through IU-th eigenvalues will be found.

It's giving "choose your own adventure" but for eigenvalues. ๐ŸŒˆ

  • UPLO โ€” UPLO is CHARACTER*1:
    • = 'U': Upper triangle of A is stored;
    • = 'L': Lower triangle of A is stored.
  • N โ€” N is INTEGER. The order of the matrix A. Constraint: N >= 0.
  • KD โ€” KD is INTEGER. The number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. Constraint: KD >= 0.
  • AB โ€” AB is REAL array, dimension (LDAB, N). On entry, the upper or lower triangle of the symmetric band matrix A, stored in the first KD+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
    • if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
    • if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd).

On exit, AB is overwritten by values generated during the reduction to tridiagonal form. If UPLO = 'U', the first superdiagonal and the diagonal of the tridiagonal matrix T are returned in rows KD and KD+1 of AB, and if UPLO = 'L', the diagonal and first subdiagonal of T are returned in the first two rows of AB. Same storage glow-up, just REAL this time. ๐Ÿ“

  • LDAB โ€” LDAB is INTEGER. The leading dimension of the array AB. Constraint: LDAB >= KD + 1.
  • Q โ€” Q is REAL array, dimension (LDQ, N). If JOBZ = 'V', the N-by-N orthogonal matrix used in the reduction to tridiagonal form. If JOBZ = 'N', the array Q is not referenced.
  • LDQ โ€” LDQ is INTEGER. The leading dimension of the array Q. If JOBZ = 'V', then LDQ >= max(1,N).
  • VL โ€” VL is REAL. If RANGE='V', the lower bound of the interval to be searched for eigenvalues. Constraint: VL < VU. Not referenced if RANGE = 'A' or 'I'.
  • VU โ€” VU is REAL. If RANGE='V', the upper bound of the interval to be searched for eigenvalues. Constraint: VL < VU. Not referenced if RANGE = 'A' or 'I'.
  • IL โ€” IL is INTEGER. If RANGE='I', the index of the smallest eigenvalue to be returned. Constraint: 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = 'A' or 'V'.
  • IU โ€” IU is INTEGER. If RANGE='I', the index of the largest eigenvalue to be returned. Constraint: 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = 'A' or 'V'.
  • ABSTOL โ€” ABSTOL is REAL. The absolute error tolerance for the eigenvalues. (And yes, the rest of the ssbevx parameter tea is still steeping โ€” this is where part 2 dips out. More coming, bestie. ๐Ÿซถ)
  • ABSTOL โ€” ABSTOL is REAL</p> and it's your absolute error tolerance for the eigenvalues, bestie. An approximate eigenvalue gets accepted as converged when we can tell it lives in an interval [a,b] whose width is less than or equal to:
ABSTOL + EPS *   max( |a|,|b| ) ,

where EPS is the machine precision. And if ABSTOL is less than or equal to zero? Then EPS*|T| gets used in its place, where |T| is the 1-norm of the tridiagonal matrix you get by reducing AB to tridiagonal form. iykyk

Heads up: eigenvalues come out most accurately when ABSTOL is set to twice the underflow threshold 2*SLAMCH('S'), not zero. And if this routine returns with INFO>0 โ€” meaning some eigenvectors didn't converge โ€” try setting ABSTOL to 2*SLAMCH('S'). ๐Ÿ’…

See by Demmel and Kahan, LAPACK Working Note #3. (no cap, the original page literally has a gap where the title should be โ€” the reference itself is Demmel and Kahan, LAPACK Working Note #3 ๐Ÿซถ)

  • M โ€” M is INTEGER</p>, the total number of eigenvalues found. 0 <= M <= N. If RANGE = 'A', then M = N, and if RANGE = 'I', then M = IU-IL+1. Math girlies stay winning โœจ
  • W โ€” W is REAL array, dimension (N)</p>. The first M elements contain the selected eigenvalues in ascending order. sorted, as a treat ๐ŸŽ€
  • Z โ€” Z is REAL array, dimension (LDZ, max(1,M))</p>. Okay so:
    • If JOBZ = 'V', then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i).
    • If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL. ๐Ÿ˜ญ
    • If JOBZ = 'N', then Z is not referenced.
    • > Note: you, the user, must ensure that at least max(1,M) columns are supplied in the array Z. If RANGE = 'V', the exact value of M isn't known in advance, so an upper bound must be used. do NOT skip this ๐Ÿ™ˆ
  • LDZ โ€” LDZ is INTEGER</p>, the leading dimension of the array Z. LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N). ๐Ÿฆ‹
  • WORK โ€” WORK is REAL array, dimension (7*N)</p>. That's seven times N, she's a big girl ๐Ÿ’œ
  • IWORK โ€” IWORK is INTEGER array, dimension (5*N)</p>. Five times N, equally iconic ๐Ÿ‘‘
  • IFAIL โ€” IFAIL is INTEGER array, dimension (N)</p>. If JOBZ = 'V', then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge. If JOBZ = 'N', then IFAIL is not referenced. she only shows up when she's needed ๐ŸŒธ
  • INFO โ€” INFO is INTEGER</p>, your exit-status bestie:
    • = 0: successful exit. we love to see it โœ…
    • < 0: if INFO = -i, the i-th argument had an illegal value. oops ๐Ÿ’€
    • > 0: if INFO = i, then i eigenvectors failed to converge. Their indices are stored in array IFAIL. it happens to the best of us

๐Ÿ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

Definition at line 262 of file ssbevx.f.


๐Ÿฆ‹ subroutine zhbevx (character jobz, character range, character uplo, integer n, integer kd, complex*16, dimension( ldab, * ) ab, integer ldab, complex*16, dimension( ldq, * ) q, integer ldq, double precision vl, double precision vu, integer il, integer iu, double precision abstol, integer m, double precision, dimension( * ) w, complex*16, dimension( ldz, * ) z, integer ldz, complex*16, dimension( * ) work, double precision, dimension( * ) rwork, integer, dimension( * ) iwork, integer, dimension( * ) ifail, integer info)

ZHBEVX computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices. the complex double-precision sibling has entered the chat ๐Ÿ’…โœจ

โœจ Purpose:

!>
!> ZHBEVX computes selected eigenvalues and, optionally, eigenvectors
!> of a complex Hermitian band matrix A.  Eigenvalues and eigenvectors
!> can be selected by specifying either a range of values or a range of
!> indices for the desired eigenvalues.
!>

so basically: complex Hermitian band matrix A, you pick which eigenvalues you want โ€” either by a range of values or a range of indices โ€” and she'll hand over the eigenvalues and, if you asked nicely, the eigenvectors too. ๐ŸŽ€

๐Ÿ’– Parameters

  • JOBZ โ€” JOBZ is CHARACTER*1</p>
    • = 'N': Compute eigenvalues only;
    • = 'V': Compute eigenvalues and eigenvectors. go big or go home
  • RANGE โ€” RANGE is CHARACTER*1</p>
    • = 'A': all eigenvalues will be found;
    • = 'V': all eigenvalues in the half-open interval (VL,VU] will be found;
    • = 'I': the IL-th through IU-th eigenvalues will be found. note the half-open interval, she is precise โœจ
  • UPLO โ€” UPLO is CHARACTER*1</p>
    • = 'U': Upper triangle of A is stored;
    • = 'L': Lower triangle of A is stored. pick a side bestie
  • N โ€” N is INTEGER</p>, the order of the matrix A. N >= 0. ๐Ÿฆ‹
  • KD โ€” KD is INTEGER</p>, the number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KD >= 0. the band width, the vibe width
  • AB โ€” AB is COMPLEX*16 array, dimension (LDAB, N)</p>. On entry, the upper or lower triangle of the Hermitian band matrix A, stored in the first KD+1 rows of the array. The j-th column of A is stored in the j-th column of the array AB as follows:
if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j;
if UPLO = 'L', AB(1+i-j,j)    = A(i,j) for j<=i<=min(n,j+kd).

On exit, AB is overwritten by values generated during the reduction to tridiagonal form. she eats your input and leaves something else behind, that's the deal ๐Ÿ’€

  • LDAB โ€” LDAB is INTEGER</p>, the leading dimension of the array AB. LDAB >= KD + 1. ๐Ÿ”ฅ
  • Q โ€” Q is COMPLEX*16 array, dimension (LDQ, N)</p>
    • If JOBZ = 'V', the N-by-N unitary matrix used in the reduction to tridiagonal form.
    • If JOBZ = 'N', the array Q is not referenced. ghosted ๐Ÿ‘ป
  • LDQ โ€” LDQ is INTEGER</p>, the leading dimension of the array Q. If JOBZ = 'V', then LDQ >= max(1,N). ๐ŸŽ€
  • VL โ€” VL is DOUBLE PRECISION</p>. If RANGE='V', the lower bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = 'A' or 'I'. strict inequality, she means it
  • VU โ€” VU is DOUBLE PRECISION</p>. If RANGE='V', the upper bound of the interval to be searched for eigenvalues. VL < VU. Not referenced if RANGE = 'A' or 'I'. โœจ
  • IL โ€” IL is INTEGER</p>. If RANGE='I', the index of the smallest eigenvalue to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = 'A' or 'V'. the N = 0 case is a whole mood ๐ŸŒธ
  • IU โ€” IU is INTEGER</p>. If RANGE='I', the index of the largest eigenvalue to be returned. 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not referenced if RANGE = 'A' or 'V'. ๐Ÿ’œ
  • ABSTOL โ€” ABSTOL is DOUBLE PRECISION</p>, the absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval [a,b] of width less than or equal to:
ABSTOL + EPS *   max( |a|,|b| ) ,

where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing AB to tridiagonal form.

Again, for the people in the back: eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*DLAMCH('S'), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*DLAMCH('S'). ๐Ÿซถ

See by Demmel and Kahan, LAPACK Working Note #3. (same missing-title situation as before, love that for us)

  • M โ€” M is INTEGER</p>, the total number of eigenvalues found. 0 <= M <= N. If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1. ๐Ÿ‘‘
  • W โ€” W is DOUBLE PRECISION array, dimension (N)</p>. The first M elements contain the selected eigenvalues in ascending order. ascending order supremacy โญ
  • Z โ€” Z is COMPLEX*16 array, dimension (LDZ, max(1,M))</p>
    • If JOBZ = 'V', then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i).
    • If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL.
    • If JOBZ = 'N', then Z is not referenced.
    • > Note: the user must ensure that at least max(1,M) columns are supplied in the array Z; if RANGE = 'V', the exact value of M is not known in advance and an upper bound must be used. this is the part where you allocate generously ๐Ÿ˜ญ
  • LDZ โ€” LDZ is INTEGER</p>, the leading dimension of the array Z. LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N). ๐Ÿฆ‹
  • WORK โ€” WORK is COMPLEX*16 array, dimension (N)</p>. ๐Ÿ’…
  • RWORK โ€” RWORK is DOUBLE PRECISION array, dimension (7*N)</p>. Seven times N, no notes โœจ
  • IWORK โ€” IWORK is INTEGER array, dimension (5*N)</p>. Five times N, also no notes ๐ŸŽ€
  • IFAIL
  • IFAIL โ€” okay so this one is an INTEGER array, dimension (N) ๐Ÿซถ. If JOBZ = 'V', then when INFO = 0, the first M elements of IFAIL are zero โ€” clean, no notes. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge, so it's literally holding the problem children ๐Ÿ˜ญ. And if JOBZ = 'N', then IFAIL is not referenced at all โ€” she's not in the group chat ๐Ÿ’….
  • INFO โ€” an INTEGER, and it's the final vibe check:
    • = 0: successful exit, we love a happy ending โœจ
    • < 0: if INFO = -i, then the i-th argument had an illegal value โ€” red flag, bestie ๐Ÿšฉ
    • > 0: if INFO = i, then i eigenvectors failed to converge, and their indices are stored in array IFAIL โ€” the receipts are right there ๐Ÿ”ฅ
๐Ÿ“ Definition at line 264 of file zhbevx.f.

๐Ÿ‘‘ Author

The author squad, no cap:

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

๐Ÿ‘‘ Author (Doxygen edition)

Generated automatically by Doxygen for LAPACK from the source code.


Okay that's a wrap, bestie ๐Ÿ’– this glow-up comes from LAPACK, Version 3.12.0 โ€” hbevx(3) โ€” and that's the whole page, periodt ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from