SRC/dsptrd.f(3)
π SRC/dsptrd.f β a.k.a. the LAPACK Library Functions Manual entry you didn't know you needed π¦
okay so bestie, buckle up, because this is the glow-up of a lifetime for a symmetric matrix β¨ We're talking DSPTRD, and no cap, it's giving main character energy in the packed-storage department.
π NAME π
SRC/dsptrd.f β literally the file, that's the name, periodt.
β¨ SYNOPSIS β¨
πΈ Functions/Subroutines πΈ
subroutine dsptrd (uplo, n, ap, d, e, tau, info)β the whole vibe, right here,DSPTRDπ
π Function/Subroutine Documentation π
π«Ά subroutine dsptrd (character uplo, integer n, double precision, dimension( * ) ap, double precision, dimension( * ) d, double precision, dimension( * ) e, double precision, dimension( * ) tau, integer info)
DSPTRD β say it with me, icon behavior π
π Purpose:
!>
!> DSPTRD reduces a real symmetric matrix A stored in packed form to
!> symmetric tridiagonal form T by an orthogonal similarity
!> transformation: Q**T * A * Q = T.
!>
so basically: take a real symmetric matrix A that's chilling in packed form, and reduce it to symmetric tridiagonal form T via an orthogonal similarity transformation. It's a whole transformation arc, and honestly? obsessed π₯
π Parameters
π UPLO
!> UPLO is CHARACTER*1
!> = 'U': Upper triangle of A is stored;
!> = 'L': Lower triangle of A is stored.
!>
it's a CHARACTER*1, and it's literally just picking sides: 'U' means the upper triangle of A is the one being stored, 'L' means the lower triangle gets the spotlight. choose your fighter π
π N
!> N is INTEGER
!> The order of the matrix A. N >= 0.
!>
an INTEGER, the order of matrix A, and it must be N >= 0 β no negatives allowed, we don't do that here π
π AP
!> AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
!> On entry, the upper or lower triangle of the symmetric matrix
!> A, packed columnwise in a linear array. The j-th column of A
!> is stored in the array AP as follows:
!> if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
!> if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
!> On exit, if UPLO = 'U', the diagonal and first superdiagonal
!> of A are overwritten by the corresponding elements of the
!> tridiagonal matrix T, and the elements above the first
!> superdiagonal, with the array TAU, represent the orthogonal
!> matrix Q as a product of elementary reflectors; if UPLO
!> = 'L', the diagonal and first subdiagonal of A are over-
!> written by the corresponding elements of the tridiagonal
!> matrix T, and the elements below the first subdiagonal, with
!> the array TAU, represent the orthogonal matrix Q as a product
!> of elementary reflectors. See Further Details.
!>
a DOUBLE PRECISION array, dimension (N*(N+1)/2), and this is where it gets spicy πΆοΈ On entry it's holding the upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. The j-th column of A lives in AP like this: if UPLO = 'U', then AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j; if UPLO = 'L', then AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
On exit? oh she changes. If UPLO = 'U', the diagonal and first superdiagonal of A get overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, together with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors. If UPLO = 'L', it's the diagonal and first subdiagonal of A that get overwritten by the corresponding elements of T, and the elements below the first subdiagonal, with TAU, represent Q as a product of elementary reflectors. See Further Details, iykyk π
π D
!> D is DOUBLE PRECISION array, dimension (N)
!> The diagonal elements of the tridiagonal matrix T:
!> D(i) = A(i,i).
!>
a DOUBLE PRECISION array, dimension (N), holding the diagonal elements of the tridiagonal matrix T: D(i) = A(i,i). it's giving diagonal realness β¨
π E
!> E is DOUBLE PRECISION array, dimension (N-1)
!> The off-diagonal elements of the tridiagonal matrix T:
!> E(i) = A(i,i+1) if UPLO = 'U', E(i) = A(i+1,i) if UPLO = 'L'.
!>
a DOUBLE PRECISION array, dimension (N-1), the off-diagonal elements of T: E(i) = A(i,i+1) if UPLO = 'U', and E(i) = A(i+1,i) if UPLO = 'L'. off-diagonal but still iconic π¦
π TAU
!> TAU is DOUBLE PRECISION array, dimension (N-1)
!> The scalar factors of the elementary reflectors (see Further
!> Details).
!>
a DOUBLE PRECISION array, dimension (N-1), holding the scalar factors of the elementary reflectors β check Further Details for the lore π
π INFO
!> INFO is INTEGER
!> = 0: successful exit
!> < 0: if INFO = -i, the i-th argument had an illegal value
!>
an INTEGER, and it's the vibes report: = 0 means successful exit, slay π and < 0 means if INFO = -i, the i-th argument had an illegal value β so something showed up to the function underdressed π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
the whole squad collaborated, we love a group project that actually worked π«Ά
π§ Further Details:
!>
!> If UPLO = 'U', the matrix Q is represented as a product of elementary
!> reflectors
!>
!> Q = H(n-1) . . . H(2) H(1).
!>
!> Each H(i) has the form
!>
!> H(i) = I - tau * v * v**T
!>
!> where tau is a real scalar, and v is a real vector with
!> v(i+1:n) = 0 and v(i) = 1; v(1:i-1) is stored on exit in AP,
!> overwriting A(1:i-1,i+1), and tau is stored in TAU(i).
!>
!> If UPLO = 'L', the matrix Q is represented as a product of elementary
!> reflectors
!>
!> Q = H(1) H(2) . . . H(n-1).
!>
!> Each H(i) has the form
!>
!> H(i) = I - tau * v * v**T
!>
!> where tau is a real scalar, and v is a real vector with
!> v(1:i) = 0 and v(i+1) = 1; v(i+2:n) is stored on exit in AP,
!> overwriting A(i+2:n,i), and tau is stored in TAU(i).
!>
so here's the tea β if UPLO = 'U', matrix Q is a product of elementary reflectors, and the order matters: Q = H(n-1) . . . H(2) H(1). Each H(i) looks like H(i) = I - tau * v * v**T, where tau is a real scalar and v is a real vector with v(i+1:n) = 0 and v(i) = 1; v(1:i-1) gets stored on exit in AP, overwriting A(1:i-1,i+1), and tau is stored in TAU(i).
If UPLO = 'L', Q is again a product of elementary reflectors but read the other way: Q = H(1) H(2) . . . H(n-1). Each H(i) is H(i) = I - tau * v * v**T, where tau is a real scalar and v is a real vector with v(1:i) = 0 and v(i+1) = 1; v(i+2:n) gets stored on exit in AP, overwriting A(i+2:n,i), and tau is stored in TAU(i). it's symmetric in spirit but the indices said "not today" πβ¨
π‘ friendly heads-up, bestie: AP does not survive unchanged. once this subroutine is done with it, the original A data up there is overwritten. like, gone. so if you needed it, save a copy β that's not a drill π₯
π Definition at line 149 of file dsptrd.f.
literally line 149, go look, she's right there π
π Author π
Generated automatically by Doxygen for LAPACK from the source code. the robots did the paperwork so we didn't have to, we stan π€π
and that's the whole page, bestie! brought to you by LAPACK, Version 3.12.0, filed neatly under SRC/dsptrd.f(3) β go forth and tridiagonalize responsibly, mwah πππΈ
π¦ where this page comes from
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms