SRC/cungqr.f(3)
π¦ SRC/cungqr.f β from the Library Functions Manual (yes bestie, we're reading manpages now)
okay so picture this: it's a .f file, it's giving fortran, it's giving linear algebra royalty, and it lives in the Library Functions Manual. come sit with me π
β¨ NAME β¨
SRC/cungqr.f β that's the icon, that's the file, that's the whole vibe. no cap.
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine cungqr (m, n, k, a, lda, tau, work, lwork, info)
CUNGQR
likeβ¦ the signature alone is main character energy π«Ά
π Function/Subroutine Documentation π
subroutine cungqr
subroutine cungqr (integer m, integer n, integer k, complex, dimension( lda, * ) a,
integer lda, complex, dimension( * ) tau, complex, dimension( * ) work,
integer lwork, integer info)
CUNGQR
π Purpose:
!>
!> CUNGQR generates an M-by-N complex matrix Q with orthonormal columns,
!> which is defined as the first N columns of a product of K elementary
!> reflectors of order M
!>
!> Q = H(1) H(2) . . . H(k)
!>
!> as returned by CGEQRF.
!>
so basically: CUNGQR builds you an M-by-N complex matrix Q with orthonormal columns, and it's literally defined as the first N columns of a product of K elementary reflectors of order M β the exact ones CGEQRF handed you. the way that math just works πβ¨
π Parameters π
MβM is INTEGER, and it's the number of rows of the matrix Q. requirement:M >= 0. no negative rows bestie, that's not a thing πNβN is INTEGER, the number of columns of the matrix Q. requirement:M >= N >= 0. yes the order matters, it's a whole sandwich π₯ͺKβK is INTEGER, the number of elementary reflectors whose product defines the matrix Q. requirement:N >= K >= 0. another sandwich, we love consistency.AβA is COMPLEX array, dimension (LDA,N). on entry, the i-th column must contain the vector which defines the elementary reflectorH(i), fori = 1,2,...,k, exactly as returned byCGEQRFin the first k columns of its array argument A. on exit? it's the M-by-N matrix Q. glow-up arc, honestly π₯LDAβLDA is INTEGER, the first dimension of the array A. requirement:LDA >= max(1,M). respect the bound or perish πTAUβTAU is COMPLEX array, dimension (K).TAU(i)must contain the scalar factor of the elementary reflectorH(i), as returned byCGEQRF. she's the little scalar that could πWORKβWORK is COMPLEX array, dimension (MAX(1,LWORK)). on exit, ifINFO = 0, thenWORK(1)returns the optimalLWORK. free gift with purchase β¨LWORKβLWORK is INTEGER, the dimension of the array WORK. requirement:LWORK >= max(1,N). for optimum performanceLWORK >= N*NB, whereNBis the optimal blocksize (periodt, optimize your blocksize).
π¨ also!! ifLWORK = -1, then a workspace query is assumed: the routine only calculates the optimal size of the WORK array, returns this value as the first entry of the WORK array, and no error message related to LWORK is issued byXERBLA. it's a vibe check, not a full run, iykyk.
INFOβINFO is INTEGER. the receipts:= 0: successful exitβ slay, we ate π< 0: if INFO = -i, the i-th argument has an illegal valueβ not slay, someone's been messing with the arguments π
π§ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
(the whole squad, we stan an academic collab π)
Definition at line 127 of file cungqr.f. β screenshot it, frame it, it's iconic πΈ
β Author β
Generated automatically by Doxygen for LAPACK from the source code. not a human, just a very diligent little document-generating fairy π§ββοΈ
okay that's the whole page bestie, you're officially a LAPACK girlie now. this cute little writeup came from LAPACK, Version 3.12.0, and the file itself is SRC/cungqr.f(3) β go forth and generate those orthonormal columns πππΈπ«Ά
π¦ 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