larft(3)

πŸŽ€ larft(3) πŸŽ€

okay so bestie, you opened the Library Functions Manual page for larft(3) and honestly? taste. this is the LAPACK girlie whose whole personality is generating the T matrix β€” she's giving linear algebra main character energy and we're gonna get through her together πŸ’…βœ¨


🌸 NAME 🌸

larft β€” literally just: larft: generate T matrix. that's her. that's the brand. πŸ’–


✨ SYNOPSIS ✨

Functions

four subroutines, one per precision, all recursive subroutines, all serving the exact same energy:

  • clarft β€” recursive subroutine clarft (direct, storev, n, k, v, ldv, tau, t, ldt) CLARFT forms the triangular factor T of a block reflector H = I - vtvH 🌈
  • dlarft β€” 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 πŸ¦‹
  • slarft β€” recursive subroutine slarft (direct, storev, n, k, v, ldv, tau, t, ldt) SLARFT forms the triangular factor T of a block reflector H = I - vtvH 🌸
  • zlarft β€” recursive subroutine zlarft (direct, storev, n, k, v, ldv, tau, t, ldt) ZLARFT forms the triangular factor T of a block reflector H = I - vtvH ⭐

πŸ’« Detailed Description πŸ’«

the Detailed Description says... absolutely nothing, bestie 😭 she's empty. it's giving mysterious. all the actual tea is down below in Function Documentation, so keep scrolling fr fr.


πŸ”₯ Function Documentation πŸ”₯

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

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

πŸ“ Purpose

okay so CLARFT forms the triangular factor T of a complex block reflector H of order n, which is defined as a product of k elementary reflectors. no cap.

  • 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 πŸ’«

and for the storage situation:

  • if STOREV = 'C', the vector that 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 that defines the elementary reflector H(i) is stored in the i-th row of the array V, and:
H  =  I - V**H * T * V

πŸŽ€ Parameters

  • DIRECT β€” DIRECT is CHARACTER*1. specifies the order in which the elementary reflectors are multiplied to form the block reflector: = 'F': H = H(1) H(2) . . . H(k) (Forward); = 'B': H = H(k) . . . H(2) H(1) (Backward). pick your fighter πŸ’…
  • STOREV β€” STOREV is CHARACTER*1. specifies how the vectors which define the elementary reflectors are stored (peep Further Details for the visuals 🫢): = 'C': columnwise; = 'R': rowwise.
  • N β€” N is INTEGER. the order of the block reflector H. N >= 0.
  • K β€” K is INTEGER. the order of the triangular factor T (= the number of elementary reflectors). K >= 1.
  • V β€” V is COMPLEX array, dimension (LDV,K) if STOREV = 'C', (LDV,N) if STOREV = 'R'. the matrix V. see further details πŸ‘€
  • LDV β€” LDV is INTEGER. the leading dimension of the array V. if STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
  • TAU β€” TAU is COMPLEX array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i). yes must. no skipping πŸ™ˆ
  • T β€” T is COMPLEX 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 β€” queen of not overstaying her welcome πŸ’€
  • LDT β€” LDT is INTEGER. the leading dimension of the array T. LDT >= K.

πŸ‘‘ Author

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

🌺 Further Details

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 )

Definition at line 162 of file clarft.f.


πŸ’œ 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

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. same plot, double the precision, we love a consistent icon 😌

  • 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 ⭐

storage vibes:

  • if STOREV = 'C', the vector that 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 that defines the elementary reflector H(i) is stored in the i-th row of the array V, and:
H  =  I - V**T * T * V

(notice: V**T this time, not V**H β€” real girlie, no conjugate for her πŸ’…)

πŸŽ€ Parameters

  • DIRECT β€” DIRECT is CHARACTER*1. specifies the order in which the elementary reflectors are multiplied to form the block reflector: = '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): = 'C': columnwise; = 'R': rowwise.
  • N β€” N is INTEGER. the order of the block reflector H. N >= 0.
  • K β€” K is INTEGER. the order of the triangular factor T (= the number of elementary reflectors). K >= 1.
  • V β€” V is DOUBLE PRECISION array, dimension (LDV,K) if STOREV = 'C', (LDV,N) if STOREV = 'R'. the matrix V. see further details πŸ‘‘
  • LDV β€” LDV is INTEGER. the leading dimension of the array V. if STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
  • TAU β€” TAU is DOUBLE PRECISION array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i).
  • 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. the rest of the array is not used.
  • LDT β€” LDT is INTEGER. the leading dimension of the array T. LDT >= K.

πŸ‘‘ Author

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

🌺 Further Details

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 )

Definition at line 162 of file dlarft.f.


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

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

πŸ“ Purpose

SLARFT forms the triangular factor T of a real block reflector H of order n, which is defined as a product of k elementary reflectors. single precision, single-minded focus, she's booked and busy πŸ’–

  • 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

storage check:

  • if STOREV = 'C', the vector that 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 that defines the elementary reflector H(i) is stored in the i-th row of the array V, and:
H  =  I - V**T * T * V

πŸŽ€ Parameters

  • DIRECT β€” DIRECT is CHARACTER*1. specifies the order in which the elementary reflectors are multiplied to form the block reflector: = 'F': H = H(1) H(2) . . . H(k) (Forward); = 'B': H = H(k) . . . H(2) H(1) (Backward).
  • STOREV β€” ...
  • STOREV β€” CHARACTER*1, bestie, this is the vibe check for how the vectors that define those elementary reflectors get stored (peep Further Details if you want the diagram, and you do want the diagram):
    • = 'C': columnwise πŸ’…
    • = 'R': rowwise ✨
  • N β€” INTEGER. The order of the block reflector H. Constraint era: N >= 0.
  • K β€” INTEGER. The order of the triangular factor T (which is, lowkey, the number of elementary reflectors). Also K >= 1, no exceptions.
  • V β€” REAL array, dimension
(LDV,K) if STOREV = 'C'
(LDV,N) if STOREV = 'R'

This is the matrix V. See further details, the picture is right there πŸŽ€

  • LDV β€” INTEGER. The leading dimension of the array V. So like β€” if STOREV = 'C', then LDV >= max(1,N); if STOREV = 'R', then LDV >= K. Get it wrong and it's giving undefined behaviour, not cute.
  • TAU β€” REAL array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i). Non-negotiable, she's required πŸ’–
  • T β€” REAL 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 literally not used β€” she's not even looking at it πŸ™ˆ
  • LDT β€” INTEGER. The leading dimension of the array T. LDT >= K. That's the whole rule, bestie, protect it.

πŸ‘‘ AUTHOR πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Johnathan Rhyne, Univ. of Colorado Denver (original author, 2024)
  • NAG Ltd.

🌸 FURTHER DETAILS 🌸

Okay so this is the part where the shape of the matrix V and the storage of the vectors defining the H(i) gets explained, and honestly the example ate. It's n = 5 and k = 3, and the elements equal to 1? Not stored. Nowhere. Gone. Iconic behaviour.

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 )

Definition at line 162 of file slarft.f. 🫢


πŸ’œ zlarft β€” the complex one πŸ’œ

recursive 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. Same energy as her real sister, just with COMPLEX*16 everywhere. She's the main character of this section ngl.

✨ PURPOSE ✨

Bestie listen: ZLARFT forms the triangular factor T of a complex block reflector H of order n, which is defined as a product of k elementary reflectors.

  • 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 πŸ¦‹

And for the storage situation:

  • 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

Note the **H moving, she switches sides, we love a flexible queen πŸ’…

πŸŽ€ PARAMETERS πŸŽ€

  • DIRECT β€” CHARACTER*1. Specifies the order in which the elementary reflectors are multiplied together to form the block reflector:
    • = 'F': H = H(1) H(2) . . . H(k) (Forward) πŸ”₯
    • = 'B': H = H(k) . . . H(2) H(1) (Backward) πŸ’€
  • STOREV β€” CHARACTER*1. Specifies how the vectors which define the elementary reflectors are stored (see also Further Details, yes again, the diagram is a classic):
    • = 'C': columnwise
    • = 'R': rowwise
  • N β€” INTEGER. The order of the block reflector H. N >= 0.
  • K β€” INTEGER. The order of the triangular factor T (= the number of elementary reflectors). K >= 1.
  • V β€” COMPLEX*16 array, dimension
(LDV,K) if STOREV = 'C'
(LDV,N) if STOREV = 'R'

The matrix V. See further details. (You know the drill by now πŸ“)

  • LDV β€” INTEGER. The leading dimension of the array V. If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K. Respect her or suffer.
  • TAU β€” COMPLEX*16 array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i). Required. Mandatory. The whole point 🌟
  • T β€” 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, she doesn't care, don't bother 🧚
  • LDT β€” 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.

🌸 FURTHER DETAILS 🌸

Same diagram as before because the math doesn't change just because we went complex, bestie. The shape of the matrix V and the storage of the vectors which define the H(i) is best illustrated by this example, with n = 5 and k = 3. 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 )

Definition at line 162 of file zlarft.f. 🫢 (Yes, same line number as slarft.f, the parallel source files are matching outfits and it's adorable.)


This whole page was generated automatically by Doxygen for LAPACK from the source code β€” not a human, just a very diligent little script doing its thing πŸ€–πŸ’–

Okay that's the whole page babes, you made it to the end, I'm so proud πŸ˜­πŸ’– This was LAPACK, Version 3.12.0, and this page is larft(3). Go forth and form your triangular factors responsibly, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from