SRC/dlarft.f(3)

πŸ’… SRC/dlarft.f(3) πŸ’…

okay so this is a page from the LAPACK library manual (yes, that LAPACK β€” the library manual name is lowkey part of the whole vibe here) and bestie, we're about to get into it. πŸŽ€


✨ NAME ✨

SRC/dlarft.f β€” literally just the file name, she's serving minimalism, we respect it πŸ’…


🌸 SYNOPSIS 🌸

πŸ¦‹ Functions/Subroutines

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

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

πŸ’œ recursive subroutine dlarft (character direct, character storev, integer n, integer k, double precision, dimension( ldv, * ) v, integer ldv, double precision, dimension( * ) tau, double precision, dimension( ldt, * ) t, integer ldt)

DLARFT forms the triangular factor T of a block reflector H = I - vtvH

🫢 Purpose:

so the whole point of this icon:

!>
!> DLARFT forms the triangular factor T of a real block reflector H
!> of order n, which is defined as a product of k elementary reflectors.
!>
!> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular;
!>
!> If DIRECT = 'B', 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**T
!>
!> 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**T * T * V
!>

like, if DIRECT = 'F' you're going forward and T is upper triangular; if DIRECT = 'B' you're going backward and T is lower triangular. and where the defining vectors live depends entirely on STOREV β€” columns or rows, pick your fighter. πŸ”₯


🌈 Parameters 🌈

  • DIRECT β€” DIRECT is CHARACTER*1. it tells you the order in which the elementary reflectors get multiplied together to build the block reflector, bestie:
!>          = 'F': H = H(1) H(2) . . . H(k) (Forward)
!>          = 'B': H = H(k) . . . H(2) H(1) (Backward)
  • STOREV β€” STOREV is CHARACTER*1. this one says how the vectors defining the elementary reflectors are stored (peep Further Details below for the visual):
!>          = 'C': columnwise
!>          = 'R': rowwise
  • N β€” N is INTEGER. the order of the block reflector H. N >= 0. no cap. ✨
  • K β€” K is INTEGER. the order of the triangular factor T (which is also literally the number of elementary reflectors, they're the same thing). K >= 1. πŸ’€
  • V β€” V is DOUBLE PRECISION array, dimension:
!>                               (LDV,K) if STOREV = 'C'
!>                               (LDV,N) if STOREV = 'R'

it's the matrix V. see further details, i promise it's cute. πŸ¦‹

  • LDV β€” LDV is INTEGER. the leading dimension of the array V. If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K. mind the switch-up, it's giving conditional 😭
  • TAU β€” TAU is DOUBLE PRECISION array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i). mandatory, she's required. πŸ™ˆ
  • T β€” T is DOUBLE PRECISION 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. and the rest of the array? not used. ignored. left on read. πŸ’…
  • LDT β€” LDT is INTEGER. the leading dimension of the array T. LDT >= K. periodt.

🧚 Author 🧚

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

the whole squad showed up for this one 🫢


⭐ Further Details: ⭐

okay this is the part where it gets visual, obsessed:

!>
!>  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.
!>
!>  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 )
!>

n = 5, k = 3, and the elements equal to 1 are not stored β€” they're implied, they're the main character energy we don't even need to write down. πŸ‘‘

Definition at line 162 of file dlarft.f. iykyk. πŸ”₯


πŸ’– Author πŸ’–

Generated automatically by Doxygen for LAPACK from the source code. (the robots did this one, not a human, slay for them honestly πŸ€–βœ¨)


ngl the vibes are immaculate. for real though β€” DIRECT, STOREV, and all those dimension rules are load-bearing, so don't get cute with them. πŸ“

that's the whole page, bestie β€” written up from the LAPACK manual, Version 3.12.0, on the SRC/dlarft.f(3) page. mwah πŸ’‹

πŸ“¦ where this page comes from