SRC/dgerqf.f(3)

πŸ’– NAME πŸ’–

SRC/dgerqf.f β€” this page is from the Library Functions Manual, and it’s literally all about DGERQF, bestie. πŸ’…


✨ SYNOPSIS ✨

Functions/Subroutines

subroutine dgerqf (m, n, a, lda, tau, work, lwork, info)

DGERQF πŸ‘‘


πŸ› οΈ Function/Subroutine Documentation πŸ› οΈ

subroutine dgerqf (integer m, integer n, double precision, dimension( lda, * ) a, integer lda, double precision, dimension( * ) tau, double precision, dimension( * ) work, integer lwork, integer info)

DGERQF β€” say it with me, iconic.

Purpose πŸŽ€

Okay so DGERQF computes an RQ factorization of a real M-by-N matrix A:

A = R * Q.

That’s the whole main-character move. ✨

Parameters 🌸

  • M β€” M is INTEGER. It’s the number of rows of the matrix A, and it has to be M >= 0. Count those rows, bestie. 🫢
  • N β€” N is INTEGER. It’s the number of columns of the matrix A, and it has to be N >= 0. Columns said β€œwe exist too.” πŸ’…
  • A β€” A is DOUBLE PRECISION array, dimension (LDA,N). On entry, it’s the M-by-N matrix A. On exit, lowkey a lot happens:
    • if m <= n, the upper triangle of the subarray A(1:m,n-m+1:n) contains the M-by-M upper triangular matrix R;
    • if m >= n, the elements on and above the (m-n)-th subdiagonal contain the M-by-N upper trapezoidal matrix R;
    • the remaining elements, with the array TAU, represent the orthogonal matrix Q as a product of min(m,n) elementary reflectors (see Further Details). No cap, that’s the whole glow-up. πŸ”₯
  • LDA β€” LDA is INTEGER. It’s the leading dimension of the array A, and it needs LDA >= max(1,M). Respect the leading dimension, periodt. πŸŽ€
  • TAU β€” TAU is DOUBLE PRECISION array, dimension (min(M,N)). These are the scalar factors of the elementary reflectors (see Further Details). Little scalars, big responsibilities. πŸ¦‹
  • WORK β€” WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, if INFO = 0, WORK(1) returns the optimal LWORK. Cute, right? πŸ’–
  • LWORK β€” LWORK is INTEGER. It’s the dimension of the array WORK.
    • LWORK >= 1, if MIN(M,N) = 0, and LWORK >= M, otherwise.
    • For optimum performance LWORK >= M*NB, where NB is the optimal blocksize.
    • If LWORK = -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 by XERBLA. That’s the workspace-query vibe check. ✨
  • INFO β€” INFO is INTEGER.
    • = 0: successful exit, slay.
    • < 0: if INFO = -i, the i-th argument had an illegal value. Not slay. 😭
Bestie, the LWORK rules are not decorative. Keep them exact. LWORK = -1 is a whole special mode, okay? πŸ’…

Author πŸ‘‘

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

Further Details πŸ”

Okay, here’s the lore. The matrix Q is represented as a product of elementary reflectors:

Q = H(1) H(2) . . . H(k), where k = min(m,n).

Each H(i) has the form:

H(i) = I - tau * v * v**T

where tau is a real scalar, and v is a real vector with

v(n-k+i+1:n) = 0 and v(n-k+i) = 1; v(1:n-k+i-1) is stored on exit in
A(m-k+i,1:n-k+i-1), and tau in TAU(i).

That’s the whole reflectors situation, and honestly it ate. πŸ’œ

Definition at line 138 of file dgerqf.f. πŸ“

Yep, line 138 of dgerqf.f. Not me knowing the exact line number and feeling famous. 🌟

Generated automatically by Doxygen for LAPACK from the source code. The robots made this page, and they understood the assignment. πŸ€–βœ¨


Sign-off vibes: this page is from LAPACK, Version 3.12.0, and the file is SRC/dgerqf.f(3) β€” no date listed, bestie. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from