SRC/dormr2.f(3)

πŸ’… SRC/dormr2.f

okay bestie, so this page is from the Library Functions Manual and it's literally all about one little subroutine β€” dormr2 β€” that lives in SRC/dormr2.f. yes it's Fortran. no we're not scared. let's go πŸŽ€


✨ SYNOPSIS ✨

Functions/Subroutines πŸ¦‹

subroutine dormr2 (side, trans, m, n, k, a, lda, tau, c, ldc, work, info)

DORMR2 multiplies a general matrix by the orthogonal matrix from a RQ factorization determined by sgerqf (unblocked algorithm). that's the whole vibe, no cap πŸ”₯


🌸 Function/Subroutine Documentation 🌸

subroutine dormr2 (character side, character trans, integer m, integer n,
    integer k, double precision, dimension( lda, * ) a, integer lda, double
    precision, dimension( * ) tau, double precision, dimension( ldc, * ) c,
    integer ldc, double precision, dimension( * ) work, integer info)

DORMR2 multiplies a general matrix by the orthogonal matrix from a RQ factorization determined by sgerqf (unblocked algorithm). like I said. iconic. πŸ‘‘

🧚 Purpose:

!> !> DORMR2 overwrites the general real m by n matrix C with !> !> Q * C if SIDE = 'L' and TRANS = 'N', or !> !> QT* C if SIDE = 'L' and TRANS = 'T', or !> !> C * Q if SIDE = 'R' and TRANS = 'N', or !> !> C * QT if SIDE = 'R' and TRANS = 'T', !> !> where Q is a real orthogonal matrix defined as the product of k !> elementary reflectors !> !> Q = H(1) H(2) . . . H(k) !> !> as returned by DGERQF. Q is of order m if SIDE = 'L' and of order n !> if SIDE = 'R'. !>

so basically C gets overwritten, bestie β€” the original C is gone, replaced by whichever of those four products your SIDE/TRANS combo picks. and Q is built out of these k elementary reflectors stacked up like Q = H(1) H(2) . . . H(k). Q is order m when SIDE = 'L', order n when SIDE = 'R'. keep up πŸ’…


✨ Parameters ✨

  • SIDE β€” it's a CHARACTER*1, and it decides which side Q slides in from:
!> SIDE is CHARACTER*1 !> = 'L': apply Q or QT from the Left !> = 'R': apply Q or QT from the Right
  • TRANS β€” also CHARACTER*1, the transpose vibe check:
!> TRANS is CHARACTER*1 !> = 'N': apply Q (No transpose) !> = 'T': apply Q' (Transpose)
  • M β€” INTEGER, the number of rows of the matrix C. and M >= 0, fr fr.
!> M is INTEGER !> The number of rows of the matrix C. M >= 0.
  • N β€” INTEGER, the number of columns of the matrix C. N >= 0. slay.
!> N is INTEGER !> The number of columns of the matrix C. N >= 0.
  • K β€” INTEGER, the number of elementary reflectors whose product defines the matrix Q. and listen: if SIDE = 'L', then M >= K >= 0; if SIDE = 'R', then N >= K >= 0. don't get it twisted 😭
!> K is INTEGER !> The number of elementary reflectors whose product defines !> the matrix Q. !> If SIDE = 'L', M >= K >= 0; !> if SIDE = 'R', N >= K >= 0.
  • A β€” a DOUBLE PRECISION array, dimension (LDA,M) if SIDE = 'L', (LDA,N) if SIDE = 'R'. the i-th row must contain the vector which defines the elementary reflector H(i), for i = 1,2,...,k, as returned by DGERQF in the last k rows of its array argument A. also lowkey important: A is modified by the routine but restored on exit. so she's messy on the inside but comes back looking exactly the same 🫢
!> A is DOUBLE PRECISION array, dimension !> (LDA,M) if SIDE = 'L', !> (LDA,N) if SIDE = 'R' !> The i-th row must contain the vector which defines the !> elementary reflector H(i), for i = 1,2,...,k, as returned by !> DGERQF in the last k rows of its array argument A. !> A is modified by the routine but restored on exit.
  • LDA β€” INTEGER, the leading dimension of the array A. LDA >= max(1,K). periodt.
!> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,K).
  • TAU β€” DOUBLE PRECISION array, dimension (K). TAU(i) must contain the scalar factor of the elementary reflector H(i), as returned by DGERQF. the little scalar besties that glue it all together πŸ’–
!> TAU is DOUBLE PRECISION array, dimension (K) !> TAU(i) must contain the scalar factor of the elementary !> reflector H(i), as returned by DGERQF.
  • C β€” DOUBLE PRECISION array, dimension (LDC,N). on entry it's the m by n matrix C. on exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q. she's a changed woman πŸ’€
!> C is DOUBLE PRECISION array, dimension (LDC,N) !> On entry, the m by n matrix C. !> On exit, C is overwritten by Q*C or QT*C or C*QT or C*Q.
  • LDC β€” INTEGER, the leading dimension of the array C. LDC >= max(1,M). don't forget it 😀
!> LDC is INTEGER !> The leading dimension of the array C. LDC >= max(1,M).
  • WORK β€” DOUBLE PRECISION array, dimension (N) if SIDE = 'L', (M) if SIDE = 'R'. the scratch space. she works hard so you don't have to 🌈
!> WORK is DOUBLE PRECISION array, dimension !> (N) if SIDE = 'L', !> (M) if SIDE = 'R'
  • INFO β€” INTEGER, the receipts:
!> INFO is INTEGER !> = 0: successful exit !> < 0: if INFO = -i, the i-th argument had an illegal value

so 0 means we ate and left no crumbs, and a negative value means argument number i was illegal β€” INFO = -i tells you exactly which one snitched πŸ™ˆ


πŸ‘‘ Author

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

Definition at line 157 of file dormr2.f. yes, line 157, iykyk ⭐


🌸 Author (again, but the auto-generated one)

Generated automatically by Doxygen for LAPACK from the source code. no human hands touched this one, it's giving robot chic πŸ€–βœ¨


and that's the whole page bestie!! πŸ’œ this was LAPACK, Version 3.12.0, from SRC/dormr2.f(3) β€” go forth and multiply some general matrices by orthogonal ones, you absolute main character πŸ¦‹πŸŽ€πŸ’…

πŸ“¦ where this page comes from