larzt(3)

πŸ’… larzt (3) β€” Library Functions Manual πŸŽ€

okay so bestie, welcome to the larzt page, section 3 of the Library Functions Manual β€” yes it's a Fortran LAPACK situation, yes it's giving very much "linear algebra girlies rise", and yes we're gonna get through the whole thing together. No cap, this page is long, so buckle up. πŸ¦‹


✨ NAME ✨

larzt β€” larzt: generate T matrix πŸ’«

That's the whole name section. Short. Iconic. Ate.


🌸 SYNOPSIS 🌸

🫢 Functions

okay so there's not one but four of these bad boys β€” one per numeric flavour, because Fortran really said "precision is a spectrum" and honestly? valid. 🌈

clarzt πŸŽ€

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

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

dlarzt πŸ’œ

subroutine dlarzt (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)

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

slarzt 🌸

subroutine slarzt (direct, storev, n, k, v, ldv, tau, t, ldt)

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

zlarzt πŸ¦‹

subroutine zlarzt (direct, storev, n, k, v, ldv, tau, t, ldt)

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


πŸ¦‹ DETAILED DESCRIPTION πŸ¦‹

the page literally just goes straight from here into the function docs β€” no extra prose, no little intro paragraph, nothing. the vibes are implied. πŸ’€


πŸ”₯ FUNCTION DOCUMENTATION πŸ”₯

⭐ subroutine clarzt ⭐

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

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

πŸ‘‘ Purpose

okay so here's the whole deal, bestie:

  • CLARZT forms the triangular factor T of a complex block reflector H of order > n, and H 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.
  • 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
lowkey important: currently, only STOREV = 'R' and DIRECT = 'B' are supported. everything else is giving "not yet, babe". 😭

🌈 Parameters

  • DIRECT β€” 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, not supported yet)
    • = '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):
    • = 'C': columnwise (not supported yet)
    • = '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 array, dimension (LDV,K) if STOREV = 'C', or (LDV,N) if STOREV = 'R'. The matrix V. See further details.
  • LDV β€” INTEGER. The leading dimension of the array V. If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
  • TAU β€” COMPLEX array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i).
  • T β€” 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. 🫢
  • LDT β€” INTEGER. The leading dimension of the array T. LDT >= K.

🧚 Author

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

πŸ“ Contributors:

  • A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA

🌟 Further Details:

okay bestie, this is the part where they draw you a picture, and honestly it's kind of a serve:

  • 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; the corresponding array elements are modified but restored on exit.
  • The rest of the array is not used.
DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':

                                            ______V_____
        ( v1 v2 v3 )                        /            \
        ( v1 v2 v3 )                      ( v1 v1 v1 v1 v1 . . . . 1 )
    V = ( v1 v2 v3 )                      ( v2 v2 v2 v2 v2 . . . 1   )
        ( v1 v2 v3 )                      ( v3 v3 v3 v3 v3 . . 1     )
        ( v1 v2 v3 )
           .  .  .
           .  .  .
           1  .  .
              1  .
                 1

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

                                                       ______V_____
           1                                          /            \
           .  1                           ( 1 . . . . v1 v1 v1 v1 v1 )
           .  .  1                        ( . 1 . . . v2 v2 v2 v2 v2 )
           .  .  .                        ( . . 1 . . v3 v3 v3 v3 v3 )
           .  .  .
        ( v1 v2 v3 )
        ( v1 v2 v3 )
    V = ( v1 v2 v3 )
        ( v1 v2 v3 )
        ( v1 v2 v3 )

Definition at line 184 of file clarzt.f. ✨


πŸ’œ subroutine dlarzt πŸ’œ

subroutine dlarzt (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)

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

πŸ‘‘ Purpose

same energy, but real this time:

  • DLARZT forms the triangular factor T of a real block reflector H of order > n, and H 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.
  • 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
again, bestie, heads up: currently, only STOREV = 'R' and DIRECT = 'B' are supported. πŸ’€

🌈 Parameters

  • DIRECT β€” 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, not supported yet)
    • = '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):
    • = 'C': columnwise (not supported yet)
    • = '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 β€” DOUBLE PRECISION array, dimension (LDV,K) if STOREV = 'C', or (LDV,N) if STOREV = 'R'. The matrix V. See further details.
  • LDV β€” INTEGER. The leading dimension of the array V. If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K.
  • TAU β€” DOUBLE PRECISION array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i).
  • T β€” 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 β€” INTEGER. The leading dimension of the array T. LDT >= K.

🧚 Author

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

πŸ“ Contributors:

  • A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA

🌟 Further Details:

okay so this is exactly where part 1 of the page cuts off β€” the dlarzt further-details diagram is waiting for us in part 2, and it's the same "n = 5, k = 3" art moment, so don't go anywhere bestie πŸ’–

okay so the shape of V and where the H(i) vectors actually live is genuinely best explained with a little diagram, and the original gives us this exact one β€” the elements equal to 1 are not stored, the corresponding array elements get modified but restored on exit, and the rest of the array is just vibing unused. here it is, character for character:

           !>
           !>  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; the corresponding
           !>  array elements are modified but restored on exit. The rest of the
           !>  array is not used.
           !>
           !>  DIRECT = 'F' and STOREV = 'C':         DIRECT = 'F' and STOREV = 'R':
           !>
           !>                                              ______V_____
           !>         ( v1 v2 v3 )                        /            \
           !>         ( v1 v2 v3 )                      ( v1 v1 v1 v1 v1 . . . . 1 )
           !>     V = ( v1 v2 v3 )                      ( v2 v2 v2 v2 v2 . . . 1   )
           !>         ( v1 v2 v3 )                      ( v3 v3 v3 v3 v3 . . 1     )
           !>         ( v1 v2 v3 )
           !>            .  .  .
           !>            .  .  .
           !>            1  .  .
           !>               1  .
           !>                  1
           !>
           !>  DIRECT = 'B' and STOREV = 'C':         DIRECT = 'B' and STOREV = 'R':
           !>
           !>                                                        ______V_____
           !>            1                                          /            \
           !>            .  1                           ( 1 . . . . v1 v1 v1 v1 v1 )
           !>            .  .  1                        ( . 1 . . . v2 v2 v2 v2 v2 )
           !>            .  .  .                        ( . . 1 . . v3 v3 v3 v3 v3 )
           !>            .  .  .
           !>         ( v1 v2 v3 )
           !>         ( v1 v2 v3 )
           !>     V = ( v1 v2 v3 )
           !>         ( v1 v2 v3 )
           !>         ( v1 v2 v3 )
           !>

Definition at line 184 of file dlarzt.f.


🌸 slarzt β€” the real-valued block-reflector bestie

       subroutine slarzt (character direct, character storev, integer n, integer k,
           real, dimension( ldv, * ) v, integer ldv, real, dimension( * ) tau,
           real, dimension( ldt, * ) t, integer ldt)

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

Purpose:

okay so SLARZT 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', 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**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
Currently, only STOREV = 'R' and DIRECT = 'B' are supported. that's the whole supported combo, bestie πŸ’…

Parameters

  • DIRECT β€” DIRECT is CHARACTER*1. spec the order in which the elementary reflectors are multiplied to form the block reflector:
    • = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
    • = 'B': H = H(k) . . . H(2) H(1) (Backward)
  • STOREV β€” STOREV is CHARACTER*1. spec how the vectors which define the elementary reflectors are stored (see also Further Details):
    • = 'C': columnwise (not supported yet)
    • = '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 REAL 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 REAL array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i).
  • T β€” T is 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 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.

Contributors:

  • A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA

Further Details:

Definition at line 184 of file slarzt.f.


πŸ¦‹ zlarzt β€” complex block-reflector edition

       subroutine zlarzt (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)

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

Purpose:

okay so ZLARZT 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.

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
Currently, only STOREV = 'R' and DIRECT = 'B' are supported. same energy, same restriction, no cap ✨

Parameters

  • DIRECT β€” DIRECT is CHARACTER*1. spec the order in which the elementary reflectors are multiplied to form the block reflector:
    • = 'F': H = H(1) H(2) . . . H(k) (Forward, not supported yet)
    • = 'B': H = H(k) . . . H(2) H(1) (Backward)
  • STOREV β€” STOREV is CHARACTER*1. spec how the vectors which define the elementary reflectors are stored (see also Further Details):
    • = 'C': columnwise (not supported yet)
    • = '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*16 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*16 array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i).
  • 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.
  • 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.

Contributors:

  • A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA

Further Details:

okay so the shape of the matrix V and how the vectors that define the H(i) are stored is best shown with this example where n = 5 and k = 3. The elements equal to 1 are not stored β€” their corresponding array spots get modified but then restored on exit. The rest of the array is just unused, literally not invited to the function. πŸ’…

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

                                            ______V_____
       ( v1 v2 v3 )                        /            \
       ( v1 v2 v3 )                      ( v1 v1 v1 v1 v1 . . . . 1 )
   V = ( v1 v2 v3 )                      ( v2 v2 v2 v2 v2 . . . 1   )
       ( v1 v2 v3 )                      ( v3 v3 v3 v3 v3 . . 1     )
       ( v1 v2 v3 )
          .  .  .
          .  .  .
          1  .  .
             1  .
                1

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

                                                      ______V_____
          1                                          /            \
          .  1                           ( 1 . . . . v1 v1 v1 v1 v1 )
          .  .  1                        ( . 1 . . . v2 v2 v2 v2 v2 )
          .  .  .                        ( . . 1 . . v3 v3 v3 v3 v3 )
          .  .  .
       ( v1 v2 v3 )
       ( v1 v2 v3 )
   V = ( v1 v2 v3 )
       ( v1 v2 v3 )
       ( v1 v2 v3 )

Definition at line 184 of file zlarzt.f.

✨ Author ✨

Generated automatically by Doxygen for LAPACK from the source code. 🫢


That’s the whole larzt(3) situation, bestie: source LAPACK, version 3.12.0, page larzt(3) β€” the footer date wasn’t in this chunk, so I’m not inventing one, periodt. Byeee πŸ’–πŸŽ€

πŸ“¦ where this page comes from