ZLARFT(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… NAME πŸ’…

okay so we're deep in the LAPACK Library Functions Manual, section 3, page zlarft.f(3) β€” and the star of the show is the source file living at /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/zlarft.f. That's the whole name situation, bestie. ✨


🌸 SYNOPSIS 🌸

Functions/Subroutines

  • subroutine ZLARFT (direct, storev, n, k, v, ldv, tau, t, ldt) β€” ZLARFT forms the triangular factor T of a block reflector H = I - vtvH

πŸŽ€ Function/Subroutine Documentation πŸŽ€

subroutine ZLARFT (character direct, character storev, integer n, integer k, complex*16, dimension( ldv, * ) v, integer ldv, complex*16, dimension( * ) tau, complex*16, dimension( ldt, * ) t, integer ldt)

ZLARFT forms the triangular factor T of a block reflector H = I - vtvH πŸ’–

πŸ¦‹ Purpose

ngl this is the whole vibe of the routine: ZLARFT forms the triangular factor T of a complex block reflector H of order n, and that H is defined as a product of k elementary reflectors. literally that's it, that's the job.

  • If DIRECT = 'F', then H = H(1) H(2) . . . H(k) and T is upper triangular;
  • If DIRECT = 'B', then H = H(k) . . . H(2) H(1) and T is lower triangular.

If STOREV = 'C', the vector which defines the elementary reflector H(i) is stored in the i-th column of the array V, and:

   H  =  I - V * T * V**H

If STOREV = 'R', the vector which defines the elementary reflector H(i) is stored in the i-th row of the array V, and:

   H  =  I - V**H * T * V

periodt. πŸ’…


✨ Parameters ✨

πŸ’œ DIRECT

DIRECT is CHARACTER*1 β€” this one specifies the order in which the elementary reflectors are multiplied to form the block reflector, iykyk:

  • = 'F': H = H(1) H(2) . . . H(k) (Forward)
  • = 'B': H = H(k) . . . H(2) H(1) (Backward)

πŸ’œ STOREV

STOREV is CHARACTER*1 β€” specifies how the vectors which define the elementary reflectors are stored (see also Further Details, it's cute down there):

  • = 'C': columnwise
  • = 'R': rowwise

πŸ’œ N

N is INTEGER β€” the order of the block reflector H. Constraint check: N >= 0. πŸ‘‘

πŸ’œ K

K is INTEGER β€” the order of the triangular factor T (which, fun fact, equals the number of elementary reflectors). Constraint check: K >= 1. πŸ”₯

πŸ’œ V

V is COMPLEX*16 array, dimension:

                     (LDV,K) if STOREV = 'C'
                     (LDV,N) if STOREV = 'R'

The matrix V. See further details, bestie (spoiler: there's a whole diagram).

πŸ’œ LDV

LDV is INTEGER β€” the leading dimension of the array V. Respectively: if STOREV = 'C', then LDV >= max(1,N); if STOREV = 'R', then LDV >= K. don't skip the vibe check on these bounds fr fr.

πŸ’œ TAU

TAU is COMPLEX*16 array, dimension (K) β€” TAU(i) must contain the scalar factor of the elementary reflector H(i). must, not "should", not "maybe", must. πŸ™ˆ

πŸ’œ T

T is COMPLEX*16 array, dimension (LDT,K) β€” the k by k triangular factor T of the block reflector. If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is lower triangular. The rest of the array is not used β€” the leftovers are just… there, minding their business. πŸ’€

πŸ’œ LDT

LDT is INTEGER β€” the leading dimension of the array T. Constraint check: LDT >= K. slay. ⭐


πŸ‘‘ Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

all icons, no notes. 🫢


🌈 Further Details: 🌈

okay this part is genuinely so satisfying, the shape of the matrix V and the storage of the vectors which define the H(i) is best illustrated by the following example with n = 5 and k = 3. The elements equal to 1 are not stored (they're implied, main character energy, they don't need to be written down):

  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':

               V = (  1       )                 V = (  1 v1 v1 v1 v1 )
                   ( v1  1    )                     (     1 v2 v2 v2 )
                   ( v1 v2  1 )                     (        1 v3 v3 )
                   ( v1 v2 v3 )
                   ( v1 v2 v3 )

  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':

               V = ( v1 v2 v3 )                 V = ( v1 v1  1       )
                   ( v1 v2 v3 )                     ( v2 v2 v2  1    )
                   (  1 v2 v3 )                     ( v3 v3 v3 v3  1 )
                   (     1 v3 )
                   (        1 )

it's giving "triangular but make it fashion." πŸŽ€


πŸ’– Official-ish note: this routine's definition is at line 162 of file zlarft.f.


🧚 Author 🧚

Generated automatically by Doxygen for LAPACK from the source code. (not me writing it by hand, the robots ate and left no crumbs ✨)


and that's the page!! πŸ¦‹ this lil doc is brought to you by LAPACK, Version 3.12.0, for zlarft.f β€” go off and form some triangular factors, bestie. πŸ“πŸ’œ

πŸ“¦ where this page comes from