SRC/sgeqp3.f(3)
β¨ SRC/sgeqp3.f β¨
okay so this is the manpage for SRC/sgeqp3.f, from the LAPACK Library Functions Manual β buckle up bestie, we're doing linear algebra π
πΈ SYNOPSIS πΈ
Functions/Subroutines
subroutine sgeqp3 (m, n, a, lda, jpvt, tau, work, lwork, info)β SGEQP3 π«Ά
π¦ Function/Subroutine Documentation π¦
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)
SGEQP3 β that's the icon, that's the main character π
π Purpose π
!> !> SGEQP3 computes a QR factorization with column pivoting of a !> matrix A: A*P = Q*R using Level 3 BLAS. !>
so literally it factors your matrix A into A*P = Q*R with column pivoting, and it does it with Level 3 BLAS because we're efficient girlies β¨
π Parameters π
M
!> M is INTEGER !> The number of rows of the matrix A. M >= 0. !>
the row count, bestie. M >= 0, no exceptions π
N
!> N is INTEGER !> The number of columns of the matrix A. N >= 0. !>
the column count. also N >= 0. we love a non-negative vibe check π
A
!> A is 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. !>
it's a REAL array, dimension (LDA,N). going in, it's your M-by-N matrix A. coming out? the upper triangle holds the min(M,N)-by-N upper trapezoidal matrix R, and everything below the diagonal β plus the array TAU β represents the orthogonal matrix Q as a product of min(M,N) elementary reflectors. she contains multitudes π
LDA
!> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,M). !>
INTEGER, the leading dimension of A. rule: LDA >= max(1,M). periodt.
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 (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 !> the K-th column of A. !>
INTEGER array, dimension (N). on entry: if JPVT(J).ne.0 then the J-th column of A gets permuted to the front of A*P (a leading column, very front-row-at-the-concert energy); if JPVT(J)=0 then 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 the K-th column of A (yes, the original says "the the", we're preserving the lore π).
TAU
!> TAU is REAL array, dimension (min(M,N)) !> The scalar factors of the elementary reflectors. !>
REAL array, dimension (min(M,N)) β the scalar factors of the elementary reflectors. tiny but powerful, honestly π
WORK
!> WORK is REAL array, dimension (MAX(1,LWORK)) !> On exit, if INFO=0, WORK(1) returns the optimal LWORK. !>
REAL array, dimension (MAX(1,LWORK)). on exit, if INFO=0, then WORK(1) returns the optimal LWORK β
LWORK
!> LWORK is 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. !>
INTEGER, dimension of the array WORK. minimum is LWORK >= 3*N+1, but for optimal performance you want LWORK >= 2*N+( N+1 )*NB, where NB is the optimal blocksize π₯
and okay this part matters: 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. it's giving "just asking, not committing" π
INFO
!> INFO is INTEGER !> = 0: successful exit. !> < 0: if INFO = -i, the i-th argument had an illegal value. !>
INTEGER. exit status tea β: = 0 means successful exit π; < 0 means 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.
the whole squad showed up for this one π«Ά
π 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). !> !> 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). !>
so 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**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). iykyk π§
π 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.
π« Author π«
Generated automatically by Doxygen for LAPACK from the source code. (yes, a robot wrote this, and it ate π€β¨)
okay that's the whole page bestie, no cap, every last detail is in there π
LAPACK β Version 3.12.0 β SRC/sgeqp3.f(3), mwah, signed off with love ππ
π¦ 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