SRC/dsbev.f(3)

πŸ’… SRC/dsbev.f β€” like, the whole LAPACK library manual, bestie

okay so picture this: it's SRC/dsbev.f, the Fortran source file, and this is its entry in the Library Functions Manual. Yes, the manual name is literally just... that. We move.


✨ SYNOPSIS ✨

🧚 Functions/Subroutines

  • subroutine dsbev (jobz, uplo, n, kd, ab, ldab, w, z, ldz, work, info) β€” DSBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

subroutine dsbev (character jobz, character uplo, integer n, integer kd, double precision, dimension( ldab, * ) ab, integer ldab, double precision, dimension( * ) w, double precision, dimension( ldz, * ) z, integer ldz, double precision, dimension( * ) work, integer info)

DSBEV computes the eigenvalues and, optionally, the left and/or right eigenvectors for OTHER matrices

πŸŽ€ Purpose:

!>
!> DSBEV computes all the eigenvalues and, optionally, eigenvectors of
!> a real symmetric band matrix A.
!>

Bestie. It finds the eigenvalues (and maybe the eigenvectors, your call) of a real symmetric band matrix A. That's the whole vibe. πŸ’–


🌸 Parameters 🌸

JOBZ

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

This is your main-character switch, ngl. 'N' = eigenvalues only (no eigenvectors, we're being efficient πŸ’…). 'V' = eigenvalues and eigenvectors, the full package.

UPLO

!>          UPLO is CHARACTER*1
!>          = 'U':  Upper triangle of A is stored;
!>          = 'L':  Lower triangle of A is stored.
!>

Which half of the symmetric matrix are you actually storing? 'U' for the upper triangle, 'L' for the lower triangle. That's it, that's the choice. πŸ¦‹

N

!>          N is INTEGER
!>          The order of the matrix A.  N >= 0.
!>

The order of matrix A. Gotta be N >= 0, no negativity allowed here. ✨

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.
!>

This one's giving "depends on UPLO" energy: it's the number of superdiagonals if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. Constraint: KD >= 0. Periodt.

AB

!>          AB is DOUBLE PRECISION 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.
!>

The big one. πŸ’€ On entry, AB holds the upper or lower triangle of the symmetric band matrix A, tucked into the first KD+1 rows of the array. The j-th column of A lives in the j-th column of AB, like so:

  • 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? Overwritten, bestie β€” AB gets replaced by values generated during the reduction to tridiagonal form. If UPLO = 'U', the first superdiagonal and the diagonal of the tridiagonal matrix T come back in rows KD and KD+1 of AB. If UPLO = 'L', the diagonal and first subdiagonal of T come back in the first two rows of AB. So don't be out here expecting your original data to still be there 😭

LDAB

!>          LDAB is INTEGER
!>          The leading dimension of the array AB.  LDAB >= KD + 1.
!>

The leading dimension of AB. Rule: LDAB >= KD + 1. Respect it. 🫢

W

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

If INFO = 0, this bad boy holds the eigenvalues in ascending order. Iconic behaviour, honestly.

Z

!>          Z is DOUBLE PRECISION array, dimension (LDZ, N)
!>          If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
!>          eigenvectors of the matrix A, with the i-th column of Z
!>          holding the eigenvector associated with W(i).
!>          If JOBZ = 'N', then Z is not referenced.
!>

If JOBZ = 'V' and INFO = 0, Z contains the orthonormal eigenvectors of A, and the i-th column of Z holds the eigenvector that goes with W(i). Matching set, we love to see it. πŸ’– If JOBZ = 'N', then Z is not referenced at all β€” it's literally just sitting there, unbothered.

LDZ

!>          LDZ is INTEGER
!>          The leading dimension of the array Z.  LDZ >= 1, and if
!>          JOBZ = 'V', LDZ >= max(1,N).
!>

Leading dimension of Z. Minimum is LDZ >= 1, and if JOBZ = 'V' you better come correct with LDZ >= max(1,N). πŸ‘‘

WORK

!>          WORK is DOUBLE PRECISION array, dimension (max(1,3*N-2))
!>

Workspace array, dimension (max(1,3*N-2)). It's the backstage crew. No notes. πŸŽ€

INFO

!>          INFO is INTEGER
!>          = 0:  successful exit
!>          < 0:  if INFO = -i, the i-th argument had an illegal value
!>          > 0:  if INFO = i, the algorithm failed to converge; i
!>                off-diagonal elements of an intermediate tridiagonal
!>                form did not converge to zero.
!>

The vibe check at the end:

  • = 0: successful exit, we ate and left no crumbs. ✨
  • < 0: if INFO = -i, the i-th argument had an illegal value β€” somebody passed something sus.
  • > 0: if INFO = i, the algorithm failed to converge; i off-diagonal elements of an intermediate tridiagonal form did not converge to zero. That's the algorithm giving up mid-glow-up, unfortunately. πŸ’€

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.


Definition at line 144 of file dsbev.f.


🌈 Author (again, yes really)

Generated automatically by Doxygen for LAPACK from the source code. Not me, not you, a robot. πŸ€–πŸ’…


k bye bestie, go find those eigenvalues πŸ¦‹βœ¨ β€” this page came to you courtesy of LAPACK, Version 3.12.0, and the date stamp on SRC/dsbev.f(3). πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from