SRC/DEPRECATED/zlahrd.f(3)

πŸ“¦
version 3.12.1 Β· 2 versions
, in arch rolling

🌸 SRC/DEPRECATED/zlahrd.f πŸ’…

okay bestie, gather round, because this is a page from the LAPACK manual (Version 3.12.0, if we're being nosy) and it's lowkey a little nostalgic β€” it's one of those deprecated girlies. Let's get into it ✨


✨ NAME ✨

SRC/DEPRECATED/zlahrd.f β€” the file, the moment, the legend. It's giving "I was replaced but I still have main character energy" πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

Functions/Subroutines

  • subroutine zlahrd (n, k, nb, a, lda, tau, t, ldt, y, ldy) β€” ZLAHRD reduces the first nb columns of a general rectangular matrix A so that elements below the k-th subdiagonal are zero, and returns auxiliary matrices which are needed to apply the transformation to the unreduced part of A.

πŸ‘‘ Function/Subroutine Documentation πŸ‘‘

subroutine zlahrd (integer n, integer k, integer nb, complex*16, dimension( lda, * ) a, integer lda, complex*16, dimension( nb ) tau, complex*16, dimension( ldt, nb ) t, integer ldt, complex*16, dimension( ldy, nb ) y, integer ldy)

ZLAHRD reduces the first nb columns of a general rectangular matrix A so that elements below the k-th subdiagonal are zero, and returns auxiliary matrices which are needed to apply the transformation to the unreduced part of A.

🧚 Purpose:

!> This routine is deprecated and has been replaced by routine ZLAHR2.

fr fr, she's deprecated β€” ZLAHR2 is the one you should be calling now, no cap. But let's still stan what she does πŸ’–

ZLAHRD reduces the first NB columns of a complex general n-by-(n-k+1) matrix A so that elements below the k-th subdiagonal are zero. The reduction is performed by a unitary similarity transformation Q**H * A * Q. The routine returns the matrices V and T which determine Q as a block reflector I - V*T*V**H, and also the matrix Y = A * V * T.

so basically: zero out the stuff below the k-th subdiagonal, and hand back V, T, and Y so you can do the same glow-up to the part of A you haven't touched yet. iconic behavior honestly 🌈


⭐ Parameters ⭐

  • N
N is INTEGER The order of the matrix A.

the size of the whole situation, bestie 🫢

  • K
K is INTEGER The offset for the reduction. Elements below the k-th subdiagonal in the first NB columns are reduced to zero.

she's the offset β€” everything below the k-th subdiagonal in the first NB columns gets sent to zero πŸ«₯

  • NB
NB is INTEGER The number of columns to be reduced.

how many columns are getting the treatment. yes ma'am πŸ’…

  • A
A is COMPLEX*16 array, dimension (LDA,N-K+1) On entry, the n-by-(n-k+1) general matrix A. On exit, the elements on and above the k-th subdiagonal in the first NB columns are overwritten with the corresponding elements of the reduced matrix; the elements below the k-th subdiagonal, with the array TAU, represent the matrix Q as a product of elementary reflectors. The other columns of A are unchanged. See Further Details.

the main character herself. on entry she's just a general matrix; on exit the first NB columns are transformed, and the bits below the k-th subdiagonal (together with TAU) become the recipe for Q. the rest of her columns? untouched, unbothered, thriving ✨

  • LDA
LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N).

leading dimension of A, and she must satisfy LDA >= max(1,N). rules are rules πŸŽ€

  • TAU
TAU is COMPLEX*16 array, dimension (NB) The scalar factors of the elementary reflectors. See Further Details.

the scalar factors of the elementary reflectors β€” the little sparkles that make the reflectors work πŸ’«

  • T
T is COMPLEX*16 array, dimension (LDT,NB) The upper triangular matrix T.

upper triangular, serving structure, we love to see it πŸ”Ί

  • LDT
LDT is INTEGER The leading dimension of the array T. LDT >= NB.

leading dimension of T, and LDT >= NB, periodt.

  • Y
Y is COMPLEX*16 array, dimension (LDY,NB) The n-by-nb matrix Y.

the n-by-nb matrix Y, exactly as advertised πŸ¦‹

  • LDY
LDY is INTEGER The leading dimension of the array Y. LDY >= max(1,N).

leading dimension of Y, and LDY >= max(1,N). don't skip the vibe check on this one πŸ™ˆ


🌸 Author 🌸

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

(the whole committee said "we made this" and honestly? credit where credit is due πŸ‘‘)


πŸ’œ Further Details:

The matrix Q is represented as a product of nb 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+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in A(i+k+1:n,i), and tau in TAU(i).

okay so each H(i) is I - tau * v * v**H, where tau is a complex scalar and v is a complex vector. v starts out with a bunch of zeros, has a 1 sitting at v(i+k), and the tail v(i+k+1:n) lives in A(i+k+1:n,i) after the routine runs β€” with tau chilling in TAU(i). precise, elegant, no notes 😭

The elements of the vectors v together form the (n-k+1)-by-nb matrix V which is needed, with T and Y, to apply the transformation to the unreduced part of the matrix, using an update of the form: A := (I - V*T*V**H) * (A - Y*V**H).

all the little v vectors team up into V, an (n-k+1)-by-nb matrix, and together with T and Y she's everything you need to update the unreduced chunk of the matrix. the update is:

A := (I - V*T*V**H) * (A - Y*V**H).
The contents of A on exit are illustrated by the following example with n = 7, k = 3 and nb = 2:
( a   h   a   a   a )
( a   h   a   a   a )
( a   h   a   a   a )
( h   h   a   a   a )
( v1  h   a   a   a )
( v1  v2  a   a   a )
( v1  v2  a   a   a )
where a denotes an element of the original matrix A, h denotes a modified element of the upper Hessenberg matrix H, and vi denotes an element of the vector defining H(i).

so in that lil diagram: a = a survivor from the original A, h = a modified element of the upper Hessenberg matrix H, and vi = an element of the vector that defines H(i). visual learners stay winning 🌈


πŸŽ€ Definition at line 166 of file zlahrd.f.


⭐ Author ⭐

Generated automatically by Doxygen for LAPACK from the source code. (yes, a robot wrote the vibes, but the math is all human πŸ’–)


and that's the whole page, bestie β€” LAPACK, Version 3.12.0, straight out of SRC/DEPRECATED/zlahrd.f, generated by Doxygen, and your girl is out here in her deprecated era being iconic anyway πŸ¦‹πŸ’…πŸ«Ά

πŸ“¦ where this page comes from