SRC/sgeqrt2.f(3)
πΈ SRC/sgeqrt2.f β bestie, let me introduce you to the QR glow-up function πΈ
Okay so like, this is the manual page for SRC/sgeqrt2.f, part of the LAPACK Library Functions Manual, and it's literally the blueprint for sgeqrt2 β a subroutine that does QR factorization using the compact WY representation of Q. It's giving linear algebra main character energy and I'm obsessed. Let me walk you through it, no cap. π
β¨ SYNOPSIS β¨
Functions/Subroutines
subroutine sgeqrt2 (m, n, a, lda, t, ldt, info)
SGEQRT2 computes a QR factorization of a general real or complex matrix using the compact WY representation of Q. Periodt. π₯
π¦ Function/Subroutine Documentation π¦
subroutine sgeqrt2 (integer m, integer n, real, dimension( lda, * ) a,
integer lda, real, dimension( ldt, * ) t, integer ldt, integer info)
SGEQRT2 computes a QR factorization of a general real or complex matrix using the compact WY representation of Q. Yes bestie, that's the whole vibe.
π Purpose π
!>!> SGEQRT2 computes a QR factorization of a real M-by-N matrix A,!> using the compact WY representation of Q.!>
Like, it takes a real M-by-N matrix A and factorizes it into Q and R, but it stores Q in that iconic compact WY form instead of building the whole thing. Efficiency slay. π
π Parameters π
MβM is INTEGER. The number of rows of the matrixA. Constraint:M >= N. Gotta have at least as many rows as columns, bestie, that's the rule. β¨NβN is INTEGER. The number of columns of the matrixA. Constraint:N >= 0. Zero columns is valid, but like, why would you? πAβA is REAL array, dimension (LDA,N). On entry, this is the realM-by-NmatrixA. On exit, the elements on and above the diagonal contain theN-by-Nupper triangular matrixR; the elements below the diagonal are the columns ofV. See below for further details β and bestie, the details are juicy. πLDAβLDA is INTEGER. The leading dimension of the arrayA. Constraint:LDA >= max(1,M). Don't skimp on this or the compiler will literally come for you. πTβT is REAL array, dimension (LDT,N). TheN-by-Nupper triangular factor of the block reflector. The elements on and above the diagonal contain the block reflectorT; the elements below the diagonal are not used. Like, they're just vibing there, ignored. πLDTβLDT is INTEGER. The leading dimension of the arrayT. Constraint:LDT >= max(1,N). Same energy asLDAβ respect the leading dimension. πINFOβINFO is INTEGER. Exit status, and it's giving binary icon:= 0: successful exit, slay! β< 0: ifINFO = -i, thei-th argument had an illegal value. Not me crying over a negative info code. π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
The whole academic dream team wrote this. Icons only. π«Ά
β Further Details β
!>!> The matrix V stores the elementary reflectors H(i) in the i-th column!> below the diagonal. For example, if M=5 and N=3, the matrix V is!>!> V = ( 1 )!> ( v1 1 )!> ( v1 v2 1 )!> ( v1 v2 v3 )!> ( v1 v2 v3 )!>!> where the vi's represent the vectors which define H(i), which are returned!> in the matrix A. The 1's along the diagonal of V are not stored in A. The!> block reflector H is then given by!>!> H = I - V * T * V**T!>!> where V**T is the transpose of V.!>
So like, V stores the elementary reflectors H(i) in the i-th column below the diagonal. If M=5 and N=3, the matrix V looks exactly like that little triangle above β the vis are the vectors defining H(i), returned in A. The 1s along the diagonal of V are NOT stored in A (they're implied, lowkey iconic), and the block reflector H is literally H = I - V * T * V**T, where V**T is the transpose of V. Not me doing matrix math in my head, it's giving genius fr fr. π₯
π Definition location π
Definition at line 126 of file sgeqrt2.f. You can literally go find it. Iykyk. π
π§ Author (meta) π§
Generated automatically by Doxygen for LAPACK from the source code. The robots did this one, bestie β we just made it cute. π€β¨
LAPACK β Version 3.12.0 β SRC/sgeqrt2.f(3) π
That's the whole page, bestie! Go forth and factorize your QR like the linear algebra icon you are. No cap, you're gonna eat this up. ππ π¦πΈ
π¦ 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