hbtrd(3)

🌸 NAME 🌸

hbtrd(3) β€” straight out of the Library Functions Manual, babes πŸ“š β€” and the actual name line is:

hbtrd β€” {hb,sb}trd: reduction to tridiagonal ✨

okay so real talk: this is the family page for the four routines that take your band matrix and reduce it to tridiagonal form. It's giving "glow-up arc". Let's go πŸ’…


✨ SYNOPSIS ✨

πŸŽ€ Functions

  • chbtrd β€” the CHBTRD girlie πŸ’œ
  • dsbtrd β€” the DSBTRD girlie πŸ’œ
  • ssbtrd β€” the SSBTRD girlie πŸ’œ
  • zhbtrd β€” the ZHBTRD girlie πŸ’œ

and their signatures, exactly, no cap:

subroutine chbtrd (vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work,
    info)
subroutine dsbtrd (vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work,
    info)
subroutine ssbtrd (vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work,
    info)
subroutine zhbtrd (vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work,
    info)

πŸ¦‹ Detailed Description πŸ¦‹

bestie the source literally has nothing under this heading. Empty. Void. Main-character silence πŸ’€ so I'm not gonna invent lore, we're just heading straight into the function docs. iykyk.


πŸ‘‘ Function Documentation πŸ‘‘

πŸ’œ subroutine chbtrd (character vect, character uplo, integer n, integer kd, complex, dimension( ldab, * ) ab, integer ldab, real, dimension( * ) d, real, dimension( * ) e, complex, dimension( ldq, * ) q, integer ldq, complex, dimension( * ) work, integer info)

CHBTRD

⭐ Purpose:

so what does she do? here's the word-for-word vibe:

!>
!> CHBTRD reduces a complex Hermitian band matrix A to real symmetric
!> tridiagonal form T by a unitary similarity transformation:
!> Q**H * A * Q = T.
!>

complex Hermitian band in, real symmetric tridiagonal out. iconic transformation honestly πŸ”₯

πŸ’… Parameters

  • VECT β€” it's a CHARACTER*1 and it controls whether we even bother building Q:
    • = 'N': do not form Q;
    • = 'V': form Q;
    • = 'U': update a matrix X, by forming X*Q.
  • UPLO β€” also CHARACTER*1, picks which triangle you're feeding her:
    • = 'U': Upper triangle of A is stored;
    • = 'L': Lower triangle of A is stored.
  • N β€” INTEGER. The order of the matrix A. N >= 0. no negatives, bestie, that's literally not allowed 🫢
  • KD β€” INTEGER. The number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KD >= 0. your band width, basically ✨
  • AB β€” 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, the diagonal elements of AB are overwritten by the diagonal elements of the tridiagonal matrix T; if KD > 0, the elements on the first superdiagonal (if UPLO = 'U') or the first subdiagonal (if UPLO = 'L') are overwritten by the off-diagonal elements of T; the rest of AB is overwritten by values generated during the reduction.

⚠️ so like β€” she overwrites AB. your original data is gone-gone. not me warning you twice πŸ’€
  • LDAB β€” INTEGER. The leading dimension of the array AB. LDAB >= KD+1. respect the boundary, queen πŸ‘‘
  • D β€” REAL array, dimension (N). The diagonal elements of the tridiagonal matrix T. the actual stars of the show πŸ’–
  • E β€” REAL array, dimension (N-1). The off-diagonal elements of the tridiagonal matrix T: E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'. she's short by one and that's correct 😌
  • Q β€” COMPLEX array, dimension (LDQ,N).

On entry, if VECT = 'U', then Q must contain an N-by-N matrix X; if VECT = 'N' or 'V', then Q need not be set.

On exit:

  • if VECT = 'V', Q contains the N-by-N unitary matrix Q;
  • if VECT = 'U', Q contains the product X*Q;
  • if VECT = 'N', the array Q is not referenced.

(yes she said "the unitary matrix Q" and also "Q" β€” same name, different energy, iykyk 🌈)

  • LDQ β€” INTEGER. The leading dimension of the array Q. LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'. read it twice, that second clause is the one people miss πŸ™ˆ
  • WORK β€” COMPLEX array, dimension (N). scratch space, no notes ✨
  • INFO β€” 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.

🌸 Further Details:

!>
!> Modified by Linda Kaufman, Bell Labs.
!>

πŸŽ€ Definition at line 161 of file chbtrd.f.


πŸ’œ subroutine dsbtrd (character vect, character uplo, integer n, integer kd, double precision, dimension( ldab, * ) ab, integer ldab, double precision, dimension( * ) d, double precision, dimension( * ) e, double precision, dimension( ldq, * ) q, integer ldq, double precision, dimension( * ) work, integer info)

DSBTRD

⭐ Purpose:

!>
!> DSBTRD reduces a real symmetric band matrix A to symmetric
!> tridiagonal form T by an orthogonal similarity transformation:
!> Q**T * A * Q = T.
!>

double precision edition, and note she says Q**T β€” the transpose, not the conjugate transpose. details matter bestie πŸ’…

πŸ’… Parameters

  • VECT β€” CHARACTER*1:
    • = 'N': do not form Q;
    • = 'V': form Q;
    • = 'U': update a matrix X, by forming X*Q.
  • UPLO β€” CHARACTER*1:
    • = 'U': Upper triangle of A is stored;
    • = 'L': Lower triangle of A is stored.
  • N β€” INTEGER. The order of the matrix A. N >= 0.
  • KD β€” INTEGER. The number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KD >= 0.
  • AB β€” 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, the diagonal elements of AB are overwritten by the diagonal elements of the tridiagonal matrix T; if KD > 0, the elements on the first superdiagonal (if UPLO = 'U') or the first subdiagonal (if UPLO = 'L') are overwritten by the off-diagonal elements of T; the rest of AB is overwritten by values generated during the reduction.

⚠️ again: AB gets overwritten. you've been warned, gorgeous 🫢
  • LDAB β€” INTEGER. The leading dimension of the array AB. LDAB >= KD+1.
  • D β€” DOUBLE PRECISION array, dimension (N). The diagonal elements of the tridiagonal matrix T.
  • E β€” DOUBLE PRECISION array, dimension (N-1). The off-diagonal elements of the tridiagonal matrix T: E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'.
  • Q β€” DOUBLE PRECISION array, dimension (LDQ,N).

On entry, if VECT = 'U', then Q must contain an N-by-N matrix X; if VECT = 'N' or 'V', then Q need not be set.

On exit:

  • if VECT = 'V', Q contains the N-by-N orthogonal matrix Q;
  • if VECT = 'U', Q contains the product X*Q;
  • if VECT = 'N', the array Q is not referenced.
  • LDQ β€” INTEGER. The leading dimension of the array Q. LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'.
  • WORK β€” DOUBLE PRECISION array, dimension (N).
  • INFO β€” 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.

🌸 Further Details:

!>
!> Modified by Linda Kaufman, Bell Labs.
!>

πŸŽ€ Definition at line 161 of file dsbtrd.f.


πŸ’œ subroutine ssbtrd (character vect, character uplo, integer n, integer kd, real, dimension( ldab, * ) ab, integer ldab, real, dimension( * ) d, real, dimension( * ) e, real, dimension( ldq, * ) q, integer ldq, real, dimension( * ) work, integer info)

SSBTRD

⭐ Purpose:

!>
!> SSBTRD reduces a real symmetric band matrix A to symmetric
!> tridiagonal form T by an orthogonal similarity transformation:
!> Q**T * A * Q = T.
!>

same routine as DSBTRD but single precision β€” she's the REAL one and yes she's still that girl πŸ”₯

πŸ’… Parameters

  • VECT β€” CHARACTER*1:
    • = 'N': do not form Q;
    • = 'V': form Q;
    • = 'U': update a matrix X, by forming X*Q.
  • UPLO β€” CHARACTER*1:
    • = 'U': Upper triangle of A is stored;
    • = 'L': Lower triangle of A is stored.
  • N β€” INTEGER. The order of the matrix A. N >= 0.
  • KD β€” INTEGER. The number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. KD >= 0.
  • AB β€” 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, the diagonal elements of AB are overwritten by the diagonal elements of the tridiagonal matrix T; if KD > 0, the elements on the first superdiagonal (if UPLO = 'U') or the first subdiagonal (if UPLO = 'L') are overwritten by the off-diagonal elements of T; the rest of AB is overwritten by values generated during the reduction.

⚠️ yes, AB is still getting overwritten. it's a whole thing. protect your data, bestie πŸ’€
  • LDAB β€” INTEGER. The leading dimension of the array AB. LDAB >= KD+1.
  • D β€” REAL array, dimension (N). The diagonal elements of the tridiagonal matrix T.
  • E β€” πŸ¦‹ (okay E's full glow-up, plus Q, LDQ, WORK, INFO, the author credits and the file line β€” all of that is literally continuing in part 2, we're stopping mid-parameter πŸ’€ hold that thought, babe 🫢)
  • E (REAL array, dimension (N-1)) β€” the off-diagonal besties of the tridiagonal matrix T, aka the ✨side characters✨. Specifically: E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'. iykyk πŸ’…
  • Q (REAL array, dimension (LDQ,N)) β€” okay so on entry, if VECT = 'U', then Q must contain an N-by-N matrix X; if VECT = 'N' or 'V', then Q need not be set (she's off duty, leave her alone πŸ™ˆ).

On exit though? Different story:

  • if VECT = 'V', Q contains the N-by-N orthogonal matrix Q β€” main character energy πŸ‘‘
  • if VECT = 'U', Q contains the product X*Q
  • if VECT = 'N', the array Q is not referenced. not even looked at. ghosted πŸ’€
  • LDQ (INTEGER) β€” the leading dimension of the array Q. Rules are LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'. respect the constraints bestie 🫢
  • WORK (REAL array, dimension (N)) β€” her little scratchpad, she works hard so you don't have to 🌸
  • INFO (INTEGER) β€” the vibe check at the end ✨
    • = 0: successful exit, we ate πŸŽ€
    • < 0: if INFO = -i, the i-th argument had an illegal value. not me getting caught lacking 😭

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

πŸ” Further Details

Modified by Linda Kaufman, Bell Labs.

Definition at line 161 of file ssbtrd.f.


🌈 subroutine zhbtrd

The complex Hermitian sibling!! same gig, different dtype, she's literally iconic πŸ’œ

subroutine zhbtrd (character vect, character uplo, integer n, integer kd,
    complex*16, dimension( ldab, * ) ab, integer ldab, double precision,
    dimension( * ) d, double precision, dimension( * ) e, complex*16,
    dimension( ldq, * ) q, integer ldq, complex*16, dimension( * ) work,
    integer info)

ZHBTRD β€” yes that's her name, no we're not shortening it πŸ’…

⭐ Purpose

ZHBTRD reduces a complex Hermitian band matrix A to real symmetric tridiagonal form T by a unitary similarity transformation: Q**H * A * Q = T.

so like. she takes your big messy Hermitian band matrix and turns it into a cute tidy tridiagonal one. a glow-up, honestly πŸ¦‹βœ¨

πŸŽ€ Parameters

  • VECT (CHARACTER*1) β€” what do you want her to do with Q, bestie? decide now 🫢
    • = 'N': do not form Q;
    • = 'V': form Q;
    • = 'U': update a matrix X, by forming X*Q.
  • UPLO (CHARACTER*1) β€” which triangle of A are we even storing?
    • = 'U': Upper triangle of A is stored;
    • = 'L': Lower triangle of A is stored.
  • N (INTEGER) β€” the order of the matrix A. and she's serious about N >= 0 πŸ“
  • KD (INTEGER) β€” the number of superdiagonals of the matrix A if UPLO = 'U', or the number of subdiagonals if UPLO = 'L'. and again: KD >= 0. no cap ⭐
  • AB (COMPLEX*16 array, dimension (LDAB,N)) β€” this is the big one, pay attention πŸ‘€

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? Oh she replaces things, be warned πŸ’€ the diagonal elements of AB are overwritten by the diagonal elements of the tridiagonal matrix T; if KD > 0, the elements on the first superdiagonal (if UPLO = 'U') or the first subdiagonal (if UPLO = 'L') are overwritten by the off-diagonal elements of T; and the rest of AB is overwritten by values generated during the reduction. so like. your input is gone, she's moved on, that's the deal πŸ™ˆ

  • LDAB (INTEGER) β€” the leading dimension of the array AB. constraint check: LDAB >= KD+1. don't test her 🌸
  • D (DOUBLE PRECISION array, dimension (N)) β€” the diagonal elements of the tridiagonal matrix T. the main characters, fr fr πŸ‘‘
  • E (DOUBLE PRECISION array, dimension (N-1)) β€” the off-diagonal elements of the tridiagonal matrix T: E(i) = T(i,i+1) if UPLO = 'U'; E(i) = T(i+1,i) if UPLO = 'L'. she's the supporting cast but she carries the plot πŸ’œ
  • Q (COMPLEX*16 array, dimension (LDQ,N)) β€” okay so on entry, if VECT = 'U', then Q must contain an N-by-N matrix X; if VECT = 'N' or 'V', then Q need not be set (she's resting, do not disturb 😴).

On exit:

  • if VECT = 'V', Q contains the N-by-N unitary matrix Q β€” note: unitary, not orthogonal, we're in complex land now bestie 🌈
  • if VECT = 'U', Q contains the product X*Q;
  • if VECT = 'N', the array Q is not referenced. not a single glance. πŸ’€
  • LDQ (INTEGER) β€” the leading dimension of the array Q. the rules: LDQ >= 1, and LDQ >= N if VECT = 'V' or 'U'. respect it or she throws INFO at you 😭
  • WORK (COMPLEX*16 array, dimension (N)) β€” her little workspace. complex this time. she's doing complex math, give her the space 🧚
  • INFO (INTEGER) β€” the final verdict ✨
    • = 0: successful exit, slay, periodt πŸŽ‰
    • < 0: if INFO = -i, the i-th argument had an illegal value. you got called out, respectfully πŸ”₯

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

πŸ” Further Details

Modified by Linda Kaufman, Bell Labs.

Definition at line 161 of file zhbtrd.f.


πŸ’– Author (the meta one)

Generated automatically by Doxygen for LAPACK from the source code.


okay bestie that's the whole page πŸ’… both ssbtrd and zhbtrd, fully documented, no details left behind, we love a complete reference 🫢 this absolute icon of a page is from LAPACK, Version 3.12.0 (page hbtrd(3)), and it was lovingly auto-generated by Doxygen from the source code β€” so if you ever need to cite your source, that's the one. go forth and reduce your band matrices, you've got this πŸŒŸπŸŽ€πŸ¦‹

πŸ“¦ where this page comes from