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', thenH = H(1) H(2) . . . H(k)andTis upper triangular π« - if
DIRECT = 'B', thenH = H(k) . . . H(2) H(1)andTis lower triangular π«
and for the storage situation:
- if
STOREV = 'C', the vector that defines the elementary reflectorH(i)is stored in thei-th column of the arrayV, and:
H = I - V * T * V**H
- if
STOREV = 'R', the vector that defines the elementary reflectorH(i)is stored in thei-th row of the arrayV, 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 reflectorH.N >= 0.KβK is INTEGER. the order of the triangular factorT(= the number of elementary reflectors).K >= 1.VβV is COMPLEX array, dimension(LDV,K)ifSTOREV = 'C',(LDV,N)ifSTOREV = 'R'. the matrixV. see further details πLDVβLDV is INTEGER. the leading dimension of the arrayV. ifSTOREV = 'C',LDV >= max(1,N); ifSTOREV = 'R',LDV >= K.TAUβTAU is COMPLEX array, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i). yes must. no skipping πTβT is COMPLEX array, dimension(LDT,K). thekbyktriangular factorTof the block reflector. ifDIRECT = 'F',Tis upper triangular; ifDIRECT = 'B',Tis 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 arrayT.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', thenH = H(1) H(2) . . . H(k)andTis upper triangular β - if
DIRECT = 'B', thenH = H(k) . . . H(2) H(1)andTis lower triangular β
storage vibes:
- if
STOREV = 'C', the vector that defines the elementary reflectorH(i)is stored in thei-th column of the arrayV, and:
H = I - V * T * V**T
- if
STOREV = 'R', the vector that defines the elementary reflectorH(i)is stored in thei-th row of the arrayV, 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 reflectorH.N >= 0.KβK is INTEGER. the order of the triangular factorT(= the number of elementary reflectors).K >= 1.VβV is DOUBLE PRECISION array, dimension(LDV,K)ifSTOREV = 'C',(LDV,N)ifSTOREV = 'R'. the matrixV. see further details πLDVβLDV is INTEGER. the leading dimension of the arrayV. ifSTOREV = 'C',LDV >= max(1,N); ifSTOREV = 'R',LDV >= K.TAUβTAU is DOUBLE PRECISION array, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i).TβT is DOUBLE PRECISION array, dimension(LDT,K). thekbyktriangular factorTof the block reflector. ifDIRECT = 'F',Tis upper triangular; ifDIRECT = 'B',Tis lower triangular. the rest of the array is not used.LDTβLDT is INTEGER. the leading dimension of the arrayT.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', thenH = H(1) H(2) . . . H(k)andTis upper triangular - if
DIRECT = 'B', thenH = H(k) . . . H(2) H(1)andTis lower triangular
storage check:
- if
STOREV = 'C', the vector that defines the elementary reflectorH(i)is stored in thei-th column of the arrayV, and:
H = I - V * T * V**T
- if
STOREV = 'R', the vector that defines the elementary reflectorH(i)is stored in thei-th row of the arrayV, 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 reflectorH. Constraint era:N >= 0.KβINTEGER. The order of the triangular factorT(which is, lowkey, the number of elementary reflectors). AlsoK >= 1, no exceptions.VβREALarray, 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 arrayV. So like β ifSTOREV = 'C', thenLDV >= max(1,N); ifSTOREV = 'R', thenLDV >= K. Get it wrong and it's giving undefined behaviour, not cute.TAUβREALarray, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i). Non-negotiable, she's required πTβREALarray, dimension(LDT,K). Thekbyktriangular factorTof the block reflector. IfDIRECT = 'F',Tis upper triangular; ifDIRECT = 'B',Tis 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 arrayT.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', thenH = H(1) H(2) . . . H(k)andTis upper triangular π - If
DIRECT = 'B', thenH = H(k) . . . H(2) H(1)andTis lower triangular π¦
And for the storage situation:
- If
STOREV = 'C', the vector which defines the elementary reflectorH(i)is stored in the i-th column of the arrayV, and
H = I - V * T * V**H
- If
STOREV = 'R', the vector which defines the elementary reflectorH(i)is stored in the i-th row of the arrayV, 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 reflectorH.N >= 0.KβINTEGER. The order of the triangular factorT(= the number of elementary reflectors).K >= 1.VβCOMPLEX*16array, 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 arrayV. IfSTOREV = 'C',LDV >= max(1,N); ifSTOREV = 'R',LDV >= K. Respect her or suffer.TAUβCOMPLEX*16array, dimension(K).TAU(i)must contain the scalar factor of the elementary reflectorH(i). Required. Mandatory. The whole point πTβCOMPLEX*16array, dimension(LDT,K). Thekbyktriangular factorTof the block reflector. IfDIRECT = 'F',Tis upper triangular; ifDIRECT = 'B',Tis lower triangular. The rest of the array is not used, she doesn't care, don't bother π§LDTβINTEGER. The leading dimension of the arrayT.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
- arch rolling: lapack-doc 3.12.1-2 Β· custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms