CUNGR2(3)
π CUNGR2 (3) β like, the whole vibe
okay bestie, so you know how LAPACK has approximately one billion subroutines and half of them are named like someone fell asleep on a keyboard? Yeah. This one lives at:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/cungr2.f
That's the whole file path, no cap. That's the "NAME" energy here β it's a Fortran source file, and this page is its little friendship bracelet of documentation. π
β¨ SYNOPSIS β¨
Under "Functions/Subroutines" we got exactly one icon:
subroutine CUNGR2 (m, n, k, a, lda, tau, work, info)
CUNGR2 generates all or part of the unitary matrix Q from an RQ factorization determined by cgerqf (unblocked algorithm).
That's the elevator pitch. Iconic. π«Ά
π Function/Subroutine Documentation π
subroutine CUNGR2 (integer m, integer n, integer k, complex, dimension( lda, * ) a, integer lda, complex, dimension( * ) tau, complex, dimension( * ) work, integer info)
CUNGR2 generates all or part of the unitary matrix Q from an RQ factorization determined by cgerqf (unblocked algorithm).
πΈ Purpose πΈ
!> !> CUNGR2 generates an m by n complex matrix Q with orthonormal rows, !> which is defined as the last m rows of a product of k elementary !> reflectors of order n !> !> Q = H(1)**H H(2)**H . . . H(k)**H !> !> as returned by CGERQF. !>
So basically β those reflectors? We're conjugating-transposing them and multiplying them all together, and that's your Q. It's giving row-orthonormal, not column, bestie. Notice the difference. π
π¦ Parameters π¦
M
!> M is INTEGER !> The number of rows of the matrix Q. M >= 0. !>
Number of rows. Cannot be negative, not even a little.
N
!> N is INTEGER !> The number of columns of the matrix Q. N >= M. !>
Number of columns, and yes N >= M is a whole requirement. It's not optional, it's a lifestyle.
K
!> K is INTEGER !> The number of elementary reflectors whose product defines the !> matrix Q. M >= K >= 0. !>
How many elementary reflectors are in the group chat, essentially. Constraint is M >= K >= 0 and we respect it. β¨
A
!> A is COMPLEX array, dimension (LDA,N) !> On entry, the (m-k+i)-th row must contain the vector which !> defines the elementary reflector H(i), for i = 1,2,...,k, as !> returned by CGERQF in the last k rows of its array argument !> A. !> On exit, the m-by-n matrix Q. !>
Okay so on entry the (m-k+i)-th row holds the vector defining H(i), for i = 1,2,...,k, exactly as CGERQF handed it over in the last k rows of its array argument A. On exit? It's Q. Glow-up complete. π Don't forget the dimension is (LDA,N).
LDA
!> LDA is INTEGER !> The first dimension of the array A. LDA >= max(1,M). !>
The first dimension of the array A, and the rule is LDA >= max(1,M). Write it down, memorize it, put it on a sticky note. π
TAU
!> TAU is COMPLEX array, dimension (K) !> TAU(i) must contain the scalar factor of the elementary !> reflector H(i), as returned by CGERQF. !>
Dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by CGERQF. No improvising, bestie. π¦
WORK
!> WORK is COMPLEX array, dimension (M) !>
Just a COMPLEX array of dimension (M). She works. That's the whole description. Respect. π
INFO
!> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument has an illegal value !>
Exit status icon: = 0 means successful exit (slay), and < 0 means if INFO = -i, the i-th argument has an illegal value (not slay, go fix your argument). π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
All four of them. Group project that actually got finished. π
Definition at line 113 of file cungr2.f.
β Author (yes, again) β
Generated automatically by Doxygen for LAPACK from the source code. Classic Doxygen behavior. It literally said "I'll do it myself." π
ππ that's the whole page, bestie β LAPACK Version 3.12.0, page footer from /home/abui...RC/cungr2.f(3), and yes, the timestamp in the footer got abbreviated into that ellipsis-laden path because that's exactly how it's printed. fr fr. π§β¨
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms