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) β€” CLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal form by an unitary similarity transformation.
  • subroutine dlatrd (uplo, n, nb, a, lda, e, tau, w, ldw) β€” DLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal form by an orthogonal similarity transformation.
  • subroutine slatrd (uplo, n, nb, a, lda, e, tau, w, ldw) β€” SLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal form by an orthogonal similarity transformation.
  • subroutine zlatrd (uplo, n, nb, a, lda, e, tau, w, ldw) β€” ZLATRD reduces the first nb rows and columns of a symmetric/Hermitian matrix A to real tridiagonal form by an unitary similarity transformation.
Note the flavour difference bestie: C and Z say unitary similarity transformation, D and S say 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 β€” UPLO is CHARACTER*1. It specifies whether the upper or lower triangular part of the Hermitian matrix A is stored:
    • = 'U': Upper triangular
    • = 'L': Lower triangular
  • N β€” N is INTEGER. The order of the matrix A.
  • NB β€” NB is INTEGER. The number of rows and columns to be reduced.
  • A β€” A is COMPLEX array, dimension (LDA,N).
    • On entry: the Hermitian 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 last NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements above the diagonal with the array TAU, represent the unitary matrix Q as 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 of A; the elements below the diagonal with the array TAU, represent the unitary matrix Q as a product of elementary reflectors.
    • See Further Details. πŸ‘‡
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= max(1,N).
  • E β€” E is 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 β€” TAU is COMPLEX array, dimension (N-1). The scalar factors of the elementary reflectors, stored in TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'. See Further Details.
  • W β€” W is COMPLEX array, dimension (LDW,NB). The n-by-nb matrix W required to update the unreduced part of A.
  • LDW β€” LDW is INTEGER. The leading dimension of the array W. 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 β€” d is the glow-up, a is untouched original content, vi is 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 β€” UPLO is CHARACTER*1. Specifies whether the upper or lower triangular part of the symmetric matrix A is stored:
    • = 'U': Upper triangular
    • = 'L': Lower triangular
  • N β€” N is INTEGER. The order of the matrix A.
  • NB β€” NB is INTEGER. The number of rows and columns to be reduced.
  • A β€” A is DOUBLE PRECISION 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 last NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements above the diagonal with the array TAU, represent the orthogonal matrix Q as 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 of A; the elements below the diagonal with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors.
    • See Further Details.
  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= (1,N).
Careful bestie β€” peep that this one says LDA >= (1,N), not the max(1,N) that clatrd had. Copy it exactly, don't "fix" it. πŸ’€
  • E β€” E is DOUBLE PRECISION 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

🫢 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 so TAU is a DOUBLE PRECISION array, dimension (N-1) πŸ’– and it holds the scalar factors of the elementary reflectors. Where do they live? In TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'. Go read Further Details if you want the whole lore, bestie 🫢
  • W β€” W is a DOUBLE PRECISION array, dimension (LDW,NB). It's the n-by-nb matrix W that you literally need in order to update the unreduced part of A. no W, no update, no slay πŸ’…
  • LDW β€” LDW is INTEGER, the leading dimension of the array W. 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 β€” UPLO is CHARACTER*1. It specifies whether the upper or lower triangular part of the symmetric matrix A is stored:
    • = 'U': Upper triangular
    • = 'L': Lower triangular
  • N β€” N is INTEGER. The order of the matrix A πŸ‘‘
  • NB β€” NB is INTEGER. The number of rows and columns to be reduced 🌸
  • A β€” A is 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 last NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements above the diagonal with the array TAU, represent the orthogonal matrix Q as 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 of A; the elements below the diagonal with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors.

See Further Details. πŸ’–

  • LDA β€” LDA is INTEGER. The leading dimension of the array A. LDA >= (1,N) ✨
  • E β€” E is 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 β€” TAU is REAL array, dimension (N-1). The scalar factors of the elementary reflectors, stored in TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'. See Further Details. πŸ’œ
  • W β€” W is REAL array, dimension (LDW,NB). The n-by-nb matrix W required to update the unreduced part of A 🫢
  • LDW β€” LDW is INTEGER. The leading dimension of the array W. 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 β€” UPLO is CHARACTER*1. It specifies whether the upper or lower triangular part of the Hermitian matrix A is stored:
    • = 'U': Upper triangular
    • = 'L': Lower triangular
  • N β€” N is INTEGER. The order of the matrix A πŸ‘‘
  • NB β€” NB is INTEGER. The number of rows and columns to be reduced 🌸
  • A β€” and okay, A is next, and A always gets a whole moment to itself, so lemme hype it up properlyβ€”
  • A β€” it's a COMPLEX*16 array, dimension (LDA,N), and on entry it's the Hermitian 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 last NB columns have been reduced to tridiagonal form, with the diagonal elements overwriting the diagonal elements of A; the elements above the diagonal with the array TAU, represent the unitary matrix Q as 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 of A; the elements below the diagonal with the array TAU, represent the unitary matrix Q as a product of elementary reflectors. ✨
    • See Further Details. πŸ¦‹
  • LDA β€” LDA is INTEGER, and it's the leading dimension of the array A. Rule check: LDA >= max(1,N). πŸ‘‘
  • E β€” E is DOUBLE PRECISION 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 β€” TAU is COMPLEX*16 array, dimension (N-1). It's the scalar factors of the elementary reflectors, stored in TAU(n-nb:n-1) if UPLO = 'U', and in TAU(1:nb) if UPLO = 'L'. See Further Details. πŸ’œ
  • W β€” W is COMPLEX*16 array, dimension (LDW,NB). It's the n-by-nb matrix W required to update the unreduced part of A. 🫢
  • LDW β€” LDW is INTEGER, and it's the leading dimension of the array W. 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