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)β CGEQP3subroutine dgeqp3 (m, n, a, lda, jpvt, tau, work, lwork, info)β DGEQP3subroutine sgeqp3 (m, n, a, lda, jpvt, tau, work, lwork, info)β SGEQP3subroutine 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 matrixA. gotta beM >= 0.NβINTEGER. the number of columns of the matrixA. alsoN >= 0.AβCOMPLEXarray, dimension(LDA,N). on entry, it's theM-by-NmatrixA. on exit, the upper triangle of the array holds themin(M,N)-by-Nupper trapezoidal matrixR, and the elements below the diagonal β together with the arrayTAUβ represent the unitary matrixQas a product ofmin(M,N)elementary reflectors. two-for-one slay πLDAβINTEGER. the leading dimension of the arrayA. needsLDA >= max(1,M).JPVTβINTEGERarray, dimension(N). on entry: ifJPVT(J).ne.0, theJ-th column ofAgets permuted to the front ofA*P(aka a leading column); ifJPVT(J)=0, theJ-th column ofAis a free column. on exit: ifJPVT(J)=K, then theJ-th column ofA*Pwas theK-th column ofA. the glow-up is real β¨TAUβCOMPLEXarray, dimension(min(M,N)). the scalar factors of the elementary reflectors.WORKβCOMPLEXarray, dimension(MAX(1,LWORK)). on exit, ifINFO=0, thenWORK(1)returns the optimalLWORK.LWORKβINTEGER. the dimension of the arrayWORK.LWORK >= N+1. for optimal performance,LWORK >= ( N+1 )*NB, whereNBis the optimal blocksize.
heads up: ifLWORK = -1, then a workspace query is assumed. the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA. so like, no yelling at you. very demure.
RWORKβREALarray, dimension(2*N).INFOβINTEGER.= 0: successful exit.< 0: ifINFO = -i, thei-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 matrixA.M >= 0.NβINTEGER. the number of columns of the matrixA.N >= 0.AβDOUBLE PRECISIONarray, dimension(LDA,N). on entry, theM-by-NmatrixA. on exit, the upper triangle of the array contains themin(M,N)-by-Nupper trapezoidal matrixR; the elements below the diagonal, together with the arrayTAU, represent the orthogonal matrixQas a product ofmin(M,N)elementary reflectors. note: orthogonal here, not unitary β that's the real-arithmetic life πLDAβINTEGER. the leading dimension of the arrayA.LDA >= max(1,M).JPVTβINTEGERarray, dimension(N). on entry: ifJPVT(J).ne.0, theJ-th column ofAis permuted to the front ofA*P(a leading column); ifJPVT(J)=0, theJ-th column ofAis a free column. on exit: ifJPVT(J)=K, then theJ-th column ofA*Pwas theK-th column ofA.TAUβDOUBLE PRECISIONarray, dimension(min(M,N)). the scalar factors of the elementary reflectors.WORKβDOUBLE PRECISIONarray, dimension(MAX(1,LWORK)). on exit, ifINFO=0, thenWORK(1)returns the optimalLWORK.LWORKβINTEGER. the dimension of the arrayWORK.LWORK >= 3*N+1. for optimal performance,LWORK >= 2*N+( N+1 )*NB, whereNBis the optimal blocksize. bestie this is not the same formula asCGEQP3, so don't go copy-pasting, i'm watching π
ifLWORK = -1, then a workspace query is assumed: the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.
INFOβINTEGER.= 0: successful exit.< 0: ifINFO = -i, thei-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 matrixA.M >= 0.NβINTEGER. the number of columns of the matrixA.N >= 0.AβREALarray, dimension(LDA,N). on entry, theM-by-NmatrixA. on exit, the upper triangle of the array contains themin(M,N)-by-Nupper trapezoidal matrixR; the elements below the diagonal, together with the arrayTAU, represent the orthogonal matrixQas a product ofmin(M,N)elementary reflectors.LDAβINTEGER. the leading dimension of the arrayA.LDA >= max(1,M).JPVTβINTEGERarray, dimension(N). on entry: ifJPVT(J).ne.0, theJ-th column ofAis permuted to the front ofA*P(a leading column); ifJPVT(J)=0, theJ-th column ofAis a free column. on exit: ifJPVT(J)=K, then theJ-th column ofA*Pwas theK-th column ofA.TAUβREALarray, dimension(min(M,N)). the scalar factors of the elementary reflectors.WORKβREALarray, dimension(MAX(1,LWORK)). on exit, ifINFO=0, thenWORK(1)returns the optimalLWORK.LWORKβINTEGER. the dimension of the arrayWORK.LWORK >= 3*N+1. for optimal performance,LWORK >= 2*N+( N+1 )*NB, whereNBis the optimal blocksize.
ifLWORK = -1, then a workspace query is assumed: the routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and no error message related toLWORKis issued byXERBLA.
INFOβINTEGER.= 0: successful exit.< 0: ifINFO = -i, thei-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: ifLWORK = -1, then a workspace query is assumed. The routine only calculates the optimal size of theWORKarray, returns this value as the first entry of theWORKarray, and β listen β no error message related toLWORKis issued byXERBLA. 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: ifINFO = -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
- 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