latrd(3)
πΈ latrd(3) β NAME πΈ
So the official name line is basically latrd - latrd: step in hetrd, and that's it. That's the whole name. It's giving "I'm a supporting character but the plot literally does not happen without me" energy, and honestly? Iconic. π
(And yes bestie, this is latrd(3) β a Library Functions Manual page, aka a library function, not a command you type in your shell. Different vibe entirely.)
β¨ SYNOPSIS β¨
π Functions
There are four of these, and they're all the same girl in different precision outfits. Behold:
subroutine clatrd (uplo, n, nb, a, lda, e, tau, w, ldw)βCLATRDreduces the first nb rows and columns of a symmetric/Hermitian matrixAto real tridiagonal form by an unitary similarity transformation.subroutine dlatrd (uplo, n, nb, a, lda, e, tau, w, ldw)βDLATRDreduces the first nb rows and columns of a symmetric/Hermitian matrixAto real tridiagonal form by an orthogonal similarity transformation.subroutine slatrd (uplo, n, nb, a, lda, e, tau, w, ldw)βSLATRDreduces the first nb rows and columns of a symmetric/Hermitian matrixAto real tridiagonal form by an orthogonal similarity transformation.subroutine zlatrd (uplo, n, nb, a, lda, e, tau, w, ldw)βZLATRDreduces the first nb rows and columns of a symmetric/Hermitian matrixAto real tridiagonal form by an unitary similarity transformation.
Note the flavour difference bestie:CandZsay unitary similarity transformation,DandSsay orthogonal. That's the complex-vs-real lore, not a typo. π¦
π¦ Detailed Description π¦
Ok so the section header <purple>Detailed Description</purple> exists, and under itβ¦ nothing. Empty. A whole heading with no thoughts, head empty, no notes. We move on to the actual function documentation. π
π Function Documentation π
π clatrd
subroutine clatrd (character uplo, integer n, integer nb, complex, dimension( lda, * ) a, integer lda, real, dimension( * ) e, complex, dimension( * ) tau, complex, dimension( ldw, * ) w, integer ldw)
CLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal form by an unitary similarity transformation.
π Purpose
Ok so real talk, CLATRD reduces NB rows and columns of a complex Hermitian matrix A to Hermitian tridiagonal form by a unitary similarity transformation Q**H * A * Q, and it hands back the matrices V and W which are needed to apply the transformation to the unreduced part of A.
If UPLO = 'U', CLATRD reduces the last NB rows and columns of a matrix, of which the upper triangle is supplied. If UPLO = 'L', CLATRD reduces the first NB rows and columns of a matrix, of which the lower triangle is supplied.
This is an auxiliary routine called by CHETRD. (So like, she doesn't get top billing, but the whole tridiagonalisation pipeline would collapse without her. Respect the grind. π«Ά)
π Parameters
UPLOβUPLOisCHARACTER*1. It specifies whether the upper or lower triangular part of the Hermitian matrixAis stored:= 'U': Upper triangular= 'L': Lower triangular
NβNisINTEGER. The order of the matrixA.NBβNBisINTEGER. The number of rows and columns to be reduced.AβAisCOMPLEXarray, dimension(LDA,N).- On entry: the Hermitian matrix
A. IfUPLO = 'U', the leading n-by-n upper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leading n-by-n lower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced. - On exit:
- if
UPLO = 'U', the last NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements ofA; the elements above the diagonal with the arrayTAU, represent the unitary matrixQas a product of elementary reflectors; - if
UPLO = 'L', the first NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements ofA; the elements below the diagonal with the arrayTAU, represent the unitary matrixQas a product of elementary reflectors.
- if
- See Further Details. π
- On entry: the Hermitian matrix
LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= max(1,N).EβEisREALarray, dimension(N-1). IfUPLO = 'U',E(n-nb:n-1)contains the superdiagonal elements of the last NB columns of the reduced matrix; ifUPLO = 'L',E(1:nb)contains the subdiagonal elements of the first NB columns of the reduced matrix.TAUβTAUisCOMPLEXarray, dimension(N-1). The scalar factors of the elementary reflectors, stored inTAU(n-nb:n-1)ifUPLO = 'U', and inTAU(1:nb)ifUPLO = 'L'. See Further Details.WβWisCOMPLEXarray, dimension(LDW,NB). The n-by-nb matrixWrequired to update the unreduced part ofA.LDWβLDWisINTEGER. The leading dimension of the arrayW.LDW >= max(1,N).
β Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
πΈ Further Details
If UPLO = 'U', the matrix Q is represented as a product of elementary reflectors:
Q = H(n) H(n-1) . . . H(n-nb+1).
Each H(i) has the form:
H(i) = I - tau * v * v**H
where tau is a complex scalar, and v is a complex vector with v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i), and tau in TAU(i-1).
If UPLO = 'L', the matrix Q is represented as a product of elementary reflectors:
Q = H(1) H(2) . . . H(nb).
Each H(i) has the form:
H(i) = I - tau * v * v**H
where tau is a complex scalar, and v is a complex vector with v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i), and tau in TAU(i).
The elements of the vectors v together form the n-by-nb matrix V which is needed, with W, to apply the transformation to the unreduced part of the matrix, using a Hermitian rank-2k update of the form: A := A - V*W**H - W*V**H.
The contents of A on exit are illustrated by the following examples with n = 5 and nb = 2:
if UPLO = 'U': if UPLO = 'L':
( a a a v4 v5 ) ( d )
( a a v4 v5 ) ( 1 d )
( a 1 v5 ) ( v1 1 a )
( d 1 ) ( v1 v2 a a )
( d ) ( v1 v2 a a a )
where d denotes a diagonal element of the reduced matrix, a denotes an element of the original matrix that is unchanged, and vi denotes an element of the vector defining H(i).
Fr fr, stare at that diagram until it clicks βdis the glow-up,ais untouched original content,viis the reflector lore. π§
Definition at line 198 of file clatrd.f.
π₯ dlatrd
subroutine dlatrd (character uplo, integer n, integer nb, double precision, dimension( lda, * ) a, integer lda, double precision, dimension( * ) e, double precision, dimension( * ) tau, double precision, dimension( ldw, * ) w, integer ldw)
DLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal form by an orthogonal similarity transformation.
π Purpose
DLATRD reduces NB rows and columns of a real symmetric matrix A to symmetric tridiagonal form by an orthogonal similarity transformation Q**T * A * Q, and returns the matrices V and W which are needed to apply the transformation to the unreduced part of A.
If UPLO = 'U', DLATRD reduces the last NB rows and columns of a matrix, of which the upper triangle is supplied. If UPLO = 'L', DLATRD reduces the first NB rows and columns of a matrix, of which the lower triangle is supplied.
This is an auxiliary routine called by DSYTRD. Same supporting-role-main-character situation as her complex sister. π
π Parameters
UPLOβUPLOisCHARACTER*1. Specifies whether the upper or lower triangular part of the symmetric matrixAis stored:= 'U': Upper triangular= 'L': Lower triangular
NβNisINTEGER. The order of the matrixA.NBβNBisINTEGER. The number of rows and columns to be reduced.AβAisDOUBLE PRECISIONarray, dimension(LDA,N).- On entry: the symmetric matrix
A. IfUPLO = 'U', the leading n-by-n upper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leading n-by-n lower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced. - On exit:
- if
UPLO = 'U', the last NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements ofA; the elements above the diagonal with the arrayTAU, represent the orthogonal matrixQas a product of elementary reflectors; - if
UPLO = 'L', the first NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements ofA; the elements below the diagonal with the arrayTAU, represent the orthogonal matrixQas a product of elementary reflectors.
- if
- See Further Details.
- On entry: the symmetric matrix
LDAβLDAisINTEGER. The leading dimension of the arrayA.LDA >= (1,N).
Careful bestie β peep that this one saysLDA >= (1,N), not themax(1,N)thatclatrdhad. Copy it exactly, don't "fix" it. π
EβEisDOUBLE PRECISIONarray, dimension(N-1). IfUPLO = 'U',E(n-nb:n-1)contains the superdiagonal elements of the last NB columns of the reduced matrix; ifUPLO = 'L',E(1:nb)contains the subdiagonal elements of the first NB columns of the reduced matrix.
π· TAU
π«Ά ok and that's exactly where part one of this page runs out β TAU's description plus everything after it is landing in part 2, so hold that thought bestie, we are NOT done.
TAUβ ok soTAUis a DOUBLE PRECISION array, dimension (N-1) π and it holds the scalar factors of the elementary reflectors. Where do they live? InTAU(n-nb:n-1)ifUPLO = 'U', and inTAU(1:nb)ifUPLO = 'L'. Go read Further Details if you want the whole lore, bestie π«ΆWβWis a DOUBLE PRECISION array, dimension (LDW,NB). It's the n-by-nb matrixWthat you literally need in order to update the unreduced part ofA. noW, no update, no slay πLDWβLDWis INTEGER, the leading dimension of the arrayW. And the rule, the law, the vibe check:LDW >= max(1,N)β¨
π Author
Like, the whole academic avengers assembled for this one:
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Further Details:
Okay this is the part where it gets gorg so pay attention π
If UPLO = 'U', the matrix Q is represented as a product of elementary reflectors:
Q = H(n) H(n-1) . . . H(n-nb+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:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i), and tau in TAU(i-1) πΈ
If UPLO = 'L', the matrix Q is represented as a product of elementary reflectors:
Q = H(1) H(2) . . . H(nb).
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+1:n) is stored on exit in A(i+1:n,i), and tau in TAU(i) π
The elements of the vectors v together form the n-by-nb matrix V which is needed, with W, to apply the transformation to the unreduced part of the matrix, using a symmetric rank-2k update of the form:
A := A - V*W**T - W*V**T.
The contents of A on exit are illustrated by the following examples with n = 5 and nb = 2:
if UPLO = 'U': if UPLO = 'L':
( a a a v4 v5 ) ( d )
( a a v4 v5 ) ( 1 d )
( a 1 v5 ) ( v1 1 a )
( d 1 ) ( v1 v2 a a )
( d ) ( v1 v2 a a a )
where d denotes a diagonal element of the reduced matrix, a denotes an element of the original matrix that is unchanged, and vi denotes an element of the vector defining H(i) π¦
Definition at line 197 of file dlatrd.f.
β subroutine slatrd
subroutine slatrd (character uplo, integer n, integer nb, real, dimension(
lda, * ) a, integer lda, real, dimension( * ) e, real, dimension( * )
tau, real, dimension( ldw, * ) w, integer ldw)
SLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal form by an orthogonal similarity transformation. Yup, that's the whole gig π
π― Purpose:
SLATRD reduces NB rows and columns of a real symmetric matrix A to symmetric tridiagonal form by an orthogonal similarity transformation Q**T * A * Q, and returns the matrices V and W which are needed to apply the transformation to the unreduced part of A β¨
If UPLO = 'U', SLATRD reduces the last NB rows and columns of a matrix, of which the upper triangle is supplied;
if UPLO = 'L', SLATRD reduces the first NB rows and columns of a matrix, of which the lower triangle is supplied π
This is an auxiliary routine called by SSYTRD. like, it's the supporting character that's secretly carrying the whole plot π«Ά
π οΈ Parameters
UPLOβUPLOis CHARACTER*1. It specifies whether the upper or lower triangular part of the symmetric matrixAis stored:= 'U': Upper triangular= 'L': Lower triangular
NβNis INTEGER. The order of the matrixAπNBβNBis INTEGER. The number of rows and columns to be reduced πΈAβAis REAL array, dimension (LDA,N).
On entry, the symmetric matrix A. If UPLO = 'U', the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced π±
On exit:
- if
UPLO = 'U', the lastNBcolumns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements ofA; the elements above the diagonal with the arrayTAU, represent the orthogonal matrixQas a product of elementary reflectors; - if
UPLO = 'L', the firstNBcolumns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements ofA; the elements below the diagonal with the arrayTAU, represent the orthogonal matrixQas a product of elementary reflectors.
See Further Details. π
LDAβLDAis INTEGER. The leading dimension of the arrayA.LDA >= (1,N)β¨EβEis REAL array, dimension (N-1).
If UPLO = 'U', E(n-nb:n-1) contains the superdiagonal elements of the last NB columns of the reduced matrix;
if UPLO = 'L', E(1:nb) contains the subdiagonal elements of the first NB columns of the reduced matrix π¦
TAUβTAUis REAL array, dimension (N-1). The scalar factors of the elementary reflectors, stored inTAU(n-nb:n-1)ifUPLO = 'U', and inTAU(1:nb)ifUPLO = 'L'. See Further Details. πWβWis REAL array, dimension (LDW,NB). The n-by-nb matrixWrequired to update the unreduced part ofAπ«ΆLDWβLDWis INTEGER. The leading dimension of the arrayW.LDW >= max(1,N). that's the rule, don't fight it π
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Further Details:
If UPLO = 'U', the matrix Q is represented as a product of elementary reflectors:
Q = H(n) H(n-1) . . . H(n-nb+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:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i), and tau in TAU(i-1) πΈ
If UPLO = 'L', the matrix Q is represented as a product of elementary reflectors:
Q = H(1) H(2) . . . H(nb).
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+1:n) is stored on exit in A(i+1:n,i), and tau in TAU(i) π
The elements of the vectors v together form the n-by-nb matrix V which is needed, with W, to apply the transformation to the unreduced part of the matrix, using a symmetric rank-2k update of the form:
A := A - V*W**T - W*V**T.
The contents of A on exit are illustrated by the following examples with n = 5 and nb = 2:
if UPLO = 'U': if UPLO = 'L':
( a a a v4 v5 ) ( d )
( a a v4 v5 ) ( 1 d )
( a 1 v5 ) ( v1 1 a )
( d 1 ) ( v1 v2 a a )
( d ) ( v1 v2 a a a )
where d denotes a diagonal element of the reduced matrix, a denotes an element of the original matrix that is unchanged, and vi denotes an element of the vector defining H(i) π¦
Definition at line 197 of file slatrd.f.
π subroutine zlatrd
subroutine zlatrd (character uplo, integer n, integer nb, complex*16,
dimension( lda, * ) a, integer lda, double precision, dimension( * ) e,
complex*16, dimension( * ) tau, complex*16, dimension( ldw, * ) w,
integer ldw)
ZLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal form by an unitary similarity transformation. complex era, but make it tridiagonal π β¨
π― Purpose:
ZLATRD reduces NB rows and columns of a complex Hermitian matrix A to Hermitian tridiagonal form by a unitary similarity transformation Q**H * A * Q, and returns the matrices V and W which are needed to apply the transformation to the unreduced part of A π₯
If UPLO = 'U', ZLATRD reduces the last NB rows and columns of a matrix, of which the upper triangle is supplied;
if UPLO = 'L', ZLATRD reduces the first NB rows and columns of a matrix, of which the lower triangle is supplied π
This is an auxiliary routine called by ZHETRD. again, the sidekick that ate π
π οΈ Parameters
UPLOβUPLOis CHARACTER*1. It specifies whether the upper or lower triangular part of the Hermitian matrixAis stored:= 'U': Upper triangular= 'L': Lower triangular
NβNis INTEGER. The order of the matrixAπNBβNBis INTEGER. The number of rows and columns to be reduced πΈAβ and okay,Ais next, andAalways gets a whole moment to itself, so lemme hype it up properlyβAβ it's aCOMPLEX*16array, dimension(LDA,N), and on entry it's the Hermitian matrixA. π IfUPLO = 'U', the leadingn-by-nupper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leadingn-by-nlower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced. π- On exit: if
UPLO = 'U', the lastNBcolumns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements ofA; the elements above the diagonal with the arrayTAU, represent the unitary matrixQas a product of elementary reflectors. β¨ - If
UPLO = 'L', the firstNBcolumns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements ofA; the elements below the diagonal with the arrayTAU, represent the unitary matrixQas a product of elementary reflectors. β¨ - See Further Details. π¦
- On exit: if
LDAβLDA is INTEGER, and it's the leading dimension of the arrayA. Rule check:LDA >= max(1,N). πEβE is DOUBLE PRECISION array, dimension (N-1). IfUPLO = 'U',E(n-nb:n-1)contains the superdiagonal elements of the lastNBcolumns of the reduced matrix; ifUPLO = 'L',E(1:nb)contains the subdiagonal elements of the firstNBcolumns of the reduced matrix. π¦TAUβTAU is COMPLEX*16 array, dimension (N-1). It's the scalar factors of the elementary reflectors, stored inTAU(n-nb:n-1)ifUPLO = 'U', and inTAU(1:nb)ifUPLO = 'L'. See Further Details. πWβW is COMPLEX*16 array, dimension (LDW,NB). It's then-by-nbmatrixWrequired to update the unreduced part ofA. π«ΆLDWβLDW is INTEGER, and it's the leading dimension of the arrayW. Rule check:LDW >= max(1,N). π
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π« Further Details:
If UPLO = 'U', the matrix Q is represented as a product of elementary reflectors:
Q = H(n) H(n-1) . . . H(n-nb+1).
Each H(i) has the form:
H(i) = I - tau * v * v**H
where tau is a complex scalar, and v is a complex vector with v(i:n) = 0 and v(i-1) = 1; v(1:i-1) is stored on exit in A(1:i-1,i), and tau in TAU(i-1). π
If UPLO = 'L', the matrix Q is represented as a product of elementary reflectors:
Q = H(1) H(2) . . . H(nb).
Each H(i) has the form:
H(i) = I - tau * v * v**H
where tau is a complex scalar, and v is a complex vector with v(1:i) = 0 and v(i+1) = 1; v(i+1:n) is stored on exit in A(i+1:n,i), and tau in TAU(i). πΈ
The elements of the vectors v together form the n-by-nb matrix V which is needed, with W, to apply the transformation to the unreduced part of the matrix, using a Hermitian rank-2k update of the form:
A := A - V*W**H - W*V**H.
The contents of A on exit are illustrated by the following examples with n = 5 and nb = 2:
if UPLO = 'U': if UPLO = 'L':
( a a a v4 v5 ) ( d )
( a a v4 v5 ) ( 1 d )
( a 1 v5 ) ( v1 1 a )
( d 1 ) ( v1 v2 a a )
( d ) ( v1 v2 a a a )
where d denotes a diagonal element of the reduced matrix, a denotes an element of the original matrix that is unchanged, and vi denotes an element of the vector defining H(i). π
Definition at line 198 of file zlatrd.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code.
That's the whole page, bestie π β source/version: LAPACK Version 3.12.0; page: latrd(3); date: not shown in this footer, ngl. π
π¦ 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