geqp3(3)

✨ NAME ✨

geqp3 β€” geqp3: QR factor with pivoting, level 3


πŸ¦‹ SYNOPSIS πŸ¦‹

🫢 Functions

  • subroutine cgeqp3 (m, n, a, lda, jpvt, tau, work, lwork, rwork, info) β€” CGEQP3
  • subroutine dgeqp3 (m, n, a, lda, jpvt, tau, work, lwork, info) β€” DGEQP3
  • subroutine sgeqp3 (m, n, a, lda, jpvt, tau, work, lwork, info) β€” SGEQP3
  • subroutine zgeqp3 (m, n, a, lda, jpvt, tau, work, lwork, rwork, info) β€” ZGEQP3

πŸ’« Detailed Description πŸ’«

okay so this section is literally just a heading with nothing under it on the original page. no cap. we move 🫢


πŸ‘‘ Function Documentation πŸ‘‘

🌸 cgeqp3 β€” CGEQP3

subroutine cgeqp3 (integer m, integer n, complex, dimension( lda, * ) a,
    integer lda, integer, dimension( * ) jpvt, complex, dimension( * ) tau,
    complex, dimension( * ) work, integer lwork, real, dimension( * ) rwork,
    integer info)

πŸ’– Purpose

bestie, CGEQP3 computes a QR factorization with column pivoting of a matrix A, and it does it using Level 3 BLAS:

A*P = Q*R

that's the whole vibe. iconic, honestly.

🌈 Parameters

  • M β€” INTEGER. the number of rows of the matrix A. gotta be M >= 0.
  • N β€” INTEGER. the number of columns of the matrix A. also N >= 0.
  • A β€” COMPLEX array, dimension (LDA,N). on entry, it's the M-by-N matrix A. on exit, the upper triangle of the array holds the min(M,N)-by-N upper trapezoidal matrix R, and the elements below the diagonal β€” together with the array TAU β€” represent the unitary matrix Q as a product of min(M,N) elementary reflectors. two-for-one slay πŸ’…
  • LDA β€” INTEGER. the leading dimension of the array A. needs LDA >= max(1,M).
  • JPVT β€” INTEGER array, dimension (N). on entry: if JPVT(J).ne.0, the J-th column of A gets permuted to the front of A*P (aka a leading column); if JPVT(J)=0, the J-th column of A is a free column. on exit: if JPVT(J)=K, then the J-th column of A*P was the K-th column of A. the glow-up is real ✨
  • TAU β€” COMPLEX array, dimension (min(M,N)). the scalar factors of the elementary reflectors.
  • WORK β€” COMPLEX array, dimension (MAX(1,LWORK)). on exit, if INFO=0, then WORK(1) returns the optimal LWORK.
  • LWORK β€” INTEGER. the dimension of the array WORK. LWORK >= N+1. for optimal performance, LWORK >= ( N+1 )*NB, where NB is the optimal blocksize.
heads up: 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. so like, no yelling at you. very demure.
  • RWORK β€” REAL array, dimension (2*N).
  • INFO β€” INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value. rude but fair πŸ’€

πŸŽ€ Author

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

⭐ Further Details

the matrix Q is represented as a product of elementary reflectors:

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

and each H(i) has the form:

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

where tau is a complex scalar, and v is a real/complex vector with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i), and tau in TAU(i). okay the indexing notation is giving math girlie but you got this 🧚

πŸ¦‹ Contributors

  • G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
  • X. Sun, Computer Science Dept., Duke University, USA

Definition at line 157 of file cgeqp3.f.


🌸 dgeqp3 β€” DGEQP3

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

πŸ’– Purpose

same energy, different precision: DGEQP3 computes a QR factorization with column pivoting of a matrix A using Level 3 BLAS:

A*P = Q*R

🌈 Parameters

  • M β€” INTEGER. the number of rows of the matrix A. M >= 0.
  • N β€” INTEGER. the number of columns of the matrix A. N >= 0.
  • A β€” DOUBLE PRECISION array, dimension (LDA,N). on entry, the M-by-N matrix A. on exit, the upper triangle of the array contains the min(M,N)-by-N upper trapezoidal matrix R; the elements below the diagonal, together with the array TAU, represent the orthogonal matrix Q as a product of min(M,N) elementary reflectors. note: orthogonal here, not unitary β€” that's the real-arithmetic life πŸŽ€
  • LDA β€” INTEGER. the leading dimension of the array A. LDA >= max(1,M).
  • JPVT β€” INTEGER array, dimension (N). on entry: if JPVT(J).ne.0, the J-th column of A is permuted to the front of A*P (a leading column); if JPVT(J)=0, the J-th column of A is a free column. on exit: if JPVT(J)=K, then the J-th column of A*P was the K-th column of A.
  • TAU β€” DOUBLE PRECISION array, dimension (min(M,N)). the scalar factors of the elementary reflectors.
  • WORK β€” DOUBLE PRECISION array, dimension (MAX(1,LWORK)). on exit, if INFO=0, then WORK(1) returns the optimal LWORK.
  • LWORK β€” INTEGER. the dimension of the array WORK. LWORK >= 3*N+1. for optimal performance, LWORK >= 2*N+( N+1 )*NB, where NB is the optimal blocksize. bestie this is not the same formula as CGEQP3, so don't go copy-pasting, i'm watching πŸ‘€
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.
  • INFO β€” INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value.

πŸŽ€ Author

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

⭐ Further Details

Q is represented as a product of elementary reflectors:

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

and each H(i) has the form:

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

where tau is a real scalar, and v is a real/complex vector with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i), and tau in TAU(i). see that **T? transpose, not conjugate-transpose. real numbers said no thanks to conjugation πŸ¦‹

πŸ¦‹ Contributors

  • G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
  • X. Sun, Computer Science Dept., Duke University, USA

Definition at line 150 of file dgeqp3.f.


🌸 sgeqp3 β€” SGEQP3

subroutine sgeqp3 (integer m, integer n, real, dimension( lda, * ) a,
    integer lda, integer, dimension( * ) jpvt, real, dimension( * ) tau,
    real, dimension( * ) work, integer lwork, integer info)

πŸ’– Purpose

SGEQP3 computes a QR factorization with column pivoting of a matrix A using Level 3 BLAS:

A*P = Q*R

single precision edition, same slay 🌈

🌈 Parameters

  • M β€” INTEGER. the number of rows of the matrix A. M >= 0.
  • N β€” INTEGER. the number of columns of the matrix A. N >= 0.
  • A β€” REAL array, dimension (LDA,N). on entry, the M-by-N matrix A. on exit, the upper triangle of the array contains the min(M,N)-by-N upper trapezoidal matrix R; the elements below the diagonal, together with the array TAU, represent the orthogonal matrix Q as a product of min(M,N) elementary reflectors.
  • LDA β€” INTEGER. the leading dimension of the array A. LDA >= max(1,M).
  • JPVT β€” INTEGER array, dimension (N). on entry: if JPVT(J).ne.0, the J-th column of A is permuted to the front of A*P (a leading column); if JPVT(J)=0, the J-th column of A is a free column. on exit: if JPVT(J)=K, then the J-th column of A*P was the K-th column of A.
  • TAU β€” REAL array, dimension (min(M,N)). the scalar factors of the elementary reflectors.
  • WORK β€” REAL array, dimension (MAX(1,LWORK)). on exit, if INFO=0, then WORK(1) returns the optimal LWORK.
  • LWORK β€” INTEGER. the dimension of the array WORK. LWORK >= 3*N+1. for optimal performance, LWORK >= 2*N+( N+1 )*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.
  • INFO β€” INTEGER. = 0: successful exit. < 0: if INFO = -i, the i-th argument had an illegal value.

πŸŽ€ Author

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

⭐ Further Details

(this is exactly where the page cuts off in part 1, bestie β€” the rest of SGEQP3's further details are coming in the next chunk 🫢)

The matrix Q is giving ✨iconic✨ build-a-bear energy β€” it's literally a product of elementary reflectors, like:

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

And every single H(i) has this form, no cap:

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

where tau is a real scalar (a humble little number πŸ₯Ί) and v is a real/complex vector with v(1:i-1) = 0 and v(i) = 1. Then v(i+1:m) is stored on exit in A(i+1:m,i), and tau lives in TAU(i). That's it, that's the whole vibe πŸ’…

🌸 Contributors:

G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain 🫢

X. Sun, Computer Science Dept., Duke University, USA 🫢

Definition at line 150 of file sgeqp3.f.


πŸ¦‹ subroutine zgeqp3

subroutine zgeqp3 (integer m, integer n, complex*16, dimension( lda, * ) a,
    integer lda, integer, dimension( * ) jpvt, complex*16, dimension( * )
    tau, complex*16, dimension( * ) work, integer lwork, double precision,
    dimension( * ) rwork, integer info)

ZGEQP3 β€” bestie, say it with me: the complex*16 glow-up πŸ‘‘βœ¨

πŸ’– Purpose:

Okay so here's the thing β€” ZGEQP3 computes a QR factorization with column pivoting of a matrix A, and it does it like this:

A*P = Q*R  using Level 3 BLAS.

Level 3 BLAS, because we don't do slow around here πŸ”₯

πŸŽ€ Parameters

M

M is INTEGER. It's the number of rows of the matrix A. Rules are rules: M >= 0.

N

N is INTEGER. It's the number of columns of the matrix A. And again: N >= 0.

A

A is COMPLEX*16 array, dimension (LDA,N).

On entry, it's the M-by-N matrix A. On exit tho β€” glow-up moment β€” the upper triangle of the array contains the min(M,N)-by-N upper trapezoidal matrix R, and the elements below the diagonal, together with the array TAU, represent the unitary matrix Q as a product of min(M,N) elementary reflectors. She contains multitudes πŸ’«

LDA

LDA is INTEGER. It's the leading dimension of the array A. Requirement: LDA >= max(1,M). Do not test her on this πŸ™ˆ

JPVT

JPVT is INTEGER array, dimension (N).

On entry: if JPVT(J).ne.0, the J-th column of A is permuted to the front of A*P β€” that's a leading column, main character energy πŸ‘‘. If JPVT(J)=0, the J-th column of A is a free column, living her best free life πŸ¦‹.

On exit: if JPVT(J)=K, then the J-th column of A*P was the K-th column of A. Receipts. We keep receipts πŸ“

TAU

TAU is COMPLEX*16 array, dimension (min(M,N)). It holds the scalar factors of the elementary reflectors. Little values, big job πŸ’…

WORK

WORK is COMPLEX*16 array, dimension (MAX(1,LWORK)).

On exit, if INFO=0, WORK(1) returns the optimal LWORK. She tells you what she needs, we love a self-aware queen ✨

LWORK

LWORK is INTEGER. It's the dimension of the array WORK. The bare minimum is LWORK >= N+1.

For optimal performance? LWORK >= ( N+1 )*NB, where NB is the optimal blocksize. Treat yourself, go big πŸŽ€

Okay so important: 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 β€” listen β€” no error message related to LWORK is issued by XERBLA. You asked, she answered, no yelling πŸ’€

RWORK

RWORK is DOUBLE PRECISION array, dimension (2*N). That's it, that's her whole description πŸ“

INFO

INFO is INTEGER, and it's the vibe check at the end:

  • = 0: successful exit. slay πŸŽ‰
  • < 0: if INFO = -i, the i-th argument had an illegal value. Not slay. Someone passed something cursed 😭

πŸ‘‘ Author

Univ. of Tennessee

Univ. of California Berkeley

Univ. of Colorado Denver

NAG Ltd.

🌈 Further Details:

The matrix Q is represented as a product of elementary reflectors β€” yes we're doing this again, but make it complex:

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

Each H(i) has the form:

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

where tau is a complex scalar, and v is a real/complex vector with v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i), and tau in TAU(i).

(Note the **H, bestie β€” conjugate transpose, because complex. The real version in sgeqp3 uses **T. Don't mix them up, iykyk 🧚)

⭐ Contributors:

G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain 🫢

X. Sun, Computer Science Dept., Duke University, USA 🫢

Definition at line 157 of file zgeqp3.f.


πŸ¦‹ Author

Generated automatically by Doxygen for LAPACK from the source code. (Not a human, just a little documentation robot doing her thing πŸ€–πŸ’œ)


And that's the whole page, bestie!! This lil masterpiece is from LAPACK, Version 3.12.0, and it's the geqp3(3) page β€” go forth and pivot your columns responsibly πŸ’…βœ¨πŸŽ€
πŸ“¦ where this page comes from