DLAQP2RK(3)
πΈ DLAQP2RK(3) πΈ
Manual name: DLAQP2RK(3) β from the Library Functions Manual, bestie. We're folding it in right here so the header line doesn't have to do all that. π
π NAME π
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dlaqp2rk.f β that's the source path for this whole DLAQP2RK(3) situation. β¨
π SYNOPSIS π
π§© Functions/Subroutines π§©
subroutine DLAQP2RK (m, n, nrhs, ioffset, kmax, abstol, reltol, kp1,
maxc2nrm, a, lda, k, maxc2nrmk, relmaxc2nrmk, jpiv, tau, vn1, vn2,
work, info)
DLAQP2RK computes truncated QR factorization with column pivoting of a real matrix block using Level 2 BLAS and overwrites a real m-by-nrhs matrix B with Q**T * B. Lowkey iconic. π
π§ Function/Subroutine Documentation π§
subroutine DLAQP2RK (integer m, integer n, integer nrhs, integer ioffset,
integer kmax, double precision abstol, double precision reltol, integer
kp1, double precision maxc2nrm, double precision, dimension( lda, * ) a,
integer lda, integer k, double precision maxc2nrmk, double precision
relmaxc2nrmk, integer, dimension( * ) jpiv, double precision, dimension(
* ) tau, double precision, dimension( * ) vn1, double precision,
dimension( * ) vn2, double precision, dimension( * ) work, integer info)
DLAQP2RK computes truncated QR factorization with column pivoting of a real matrix block using Level 2 BLAS and overwrites a real m-by-nrhs matrix B with Q**T * B. Same energy, full formal fit. β¨
π― Purpose π―
Okay so here's the tea: DLAQP2RK computes a truncated (rank K) or full rank Householder QR factorization with column pivoting of a real matrix block A(IOFFSET+1:M,1:N) as
A * P(K) = Q(K) * R(K).
It uses Level 2 BLAS. The block A(1:IOFFSET,1:N) is accordingly pivoted, but not factorized. No cap.
The routine also overwrites the right-hand-sides matrix block B stored in A(IOFFSET+1:M,N+1:N+NRHS) with Q(K)**T * B. Slay. π
π Parameters π
MβM is INTEGER. It's the number of rows of matrixA, andM >= 0. Keep it cute and non-negative. πΈNβN is INTEGER. It's the number of columns of matrixA, withN >= 0. πΌNRHSβNRHS is INTEGER. The number of right hand sides, i.e. the number of columns of matrixB. AlsoNRHS >= 0. πIOFFSETβIOFFSET is INTEGER. The number of rows of matrixAthat must be pivoted but not factorized.IOFFSET >= 0.
IOFFSET also represents the number of columns of the whole original matrix A_orig that have been factorized in the previous steps. So it's giving "we already did some of this" energy.
KMAXβKMAX is INTEGER. This is the first factorization stopping criterion, andKMAX >= 0.
It's the maximum number of columns of matrix A to factorize, i.e. the maximum factorization rank.
- a) If
KMAX >= min(M-IOFFSET,N), then this stopping criterion is not used; factorize columns depending onABSTOLandRELTOL. - b) If
KMAX = 0, then this stopping criterion is satisfied on input and the routine exits immediately. That means the factorization is not performed, and the matricesAandBand the arraysTAU,IPIVare not modified. Important detail, bestie. π«Ά
ABSTOLβABSTOL is DOUBLE PRECISION, cannot beNaN. This is the second factorization stopping criterion.
It's the absolute tolerance (stopping threshold) for maximum column 2-norm of the residual matrix. The algorithm converges (stops the factorization) when the maximum column 2-norm of the residual matrix is less than or equal to ABSTOL.
- a) If
ABSTOL < 0.0, then this stopping criterion is not used; the routine factorizes columns depending onKMAXandRELTOL. This includes the caseABSTOL = -Inf. - b) If
0.0 <= ABSTOLthen the input value ofABSTOLis used.
RELTOLβRELTOL is DOUBLE PRECISION, cannot beNaN. Third factorization stopping criterion, periodt.
It's the tolerance (stopping threshold) for the ratio of the maximum column 2-norm of the residual matrix to the maximum column 2-norm of the original matrix A_orig. The algorithm converges (stops the factorization) when this ratio is less than or equal to RELTOL.
- a) If
RELTOL < 0.0, then this stopping criterion is not used; the routine factorizes columns depending onKMAXandABSTOL. This includes the caseRELTOL = -Inf. - d) If
0.0 <= RELTOLthen the input value ofRELTOLis used.
KP1βKP1 is INTEGER. The index of the column with the maximum 2-norm in the whole original matrixA_origdetermined in the main routineDGEQP3RK. Constraint:1 <= KP1 <= N_orig_mat. πMAXC2NRMβMAXC2NRM is DOUBLE PRECISION. The maximum column 2-norm of the whole original matrixA_origcomputed in the main routineDGEQP3RK.MAXC2NRM >= 0. β¨AβA is DOUBLE PRECISION array, dimension (LDA,N+NRHS).
On entry: the M-by-N matrix A and M-by-NRHS matrix B, as in
N NRHS
array_A = M [ mat_A, mat_B ]
On exit:
- The elements in block
A(IOFFSET+1:M,1:K)below the diagonal together with the arrayTAUrepresent the orthogonal matrixQ(K)as a product of elementary reflectors. - The upper triangular block of matrix
Astored inA(IOFFSET+1:M,1:K)is the triangular factor obtained. - The block of matrix
Astored inA(1:IOFFSET,1:N)has been accordingly pivoted, but not factorized. - The rest of array
A, blockA(IOFFSET+1:M,K+1:N+NRHS). The left partA(IOFFSET+1:M,K+1:N)of this block contains the residual of matrixA, and, ifNRHS > 0, the right part of the blockA(IOFFSET+1:M,N+1:N+NRHS)contains the block of the right-hand-side matrixB. Both these blocks have been updated by multiplication from the left byQ(K)**T. π
LDAβLDA is INTEGER. The leading dimension of arrayA. Constraint:LDA >= max(1,M). πKβK is INTEGER. Factorization rank of matrixA, i.e. the rank of factorR, which is the same as the number of non-zero rows of factorR. Constraint:0 <= K <= min(M-IOFFSET,KMAX,N).
K also represents the number of non-zero Householder vectors. Iconic. π
MAXC2NRMKβMAXC2NRMK is DOUBLE PRECISION. The maximum column 2-norm of the residual matrix, when the factorization stopped at rankK.MAXC2NRMK >= 0. πRELMAXC2NRMKβRELMAXC2NRMK is DOUBLE PRECISION. The ratioMAXC2NRMK / MAXC2NRMof the maximum column 2-norm of the residual matrix (when the factorization stopped at rankK) to the maximum column 2-norm of the whole original matrixA.RELMAXC2NRMK >= 0. βJPIVβJPIV is INTEGER array, dimension (N). Column pivot indices: for1 <= j <= N, columnjof matrixAwas interchanged with columnJPIV(j). π¦TAUβTAU is DOUBLE PRECISION array, dimension (min(M-IOFFSET,N)). The scalar factors of the elementary reflectors. π§VN1βVN1 is DOUBLE PRECISION array, dimension (N). The vector with the partial column norms. πΈVN2βVN2 is DOUBLE PRECISION array, dimension (N). The vector with the exact column norms. πWORKβWORK is DOUBLE PRECISION array, dimension (N-1). Used inDLARFsubroutine to apply an elementary reflector from the left. π«ΆINFOβINFO is INTEGER.INFO = 0: successful exit. We love a clean exit. β¨- If
INFO = j_1, where1 <= j_1 <= N, thenNaNwas detected and the routine stops the computation. Thej_1-th column of matrixAor thej_1-th element of arrayTAUcontains the first occurrence ofNaNin the factorization stepK+1( whenKcolumns have been factorized ).
On exit:
Kis set to the number of factorized columns without exception.MAXC2NRMKis set toNaN.RELMAXC2NRMKis set toNaN.TAU(K+1:min(M,N))is not set and contains undefined elements. Ifj_1=K+1,TAU(K+1)may containNaN.
- If
INFO = j_2, whereN+1 <= j_2 <= 2*N, then noNaNwas detected, but+Inf(or-Inf) was detected and the routine continues the computation until completion. The(j_2-N)-th column of matrixAcontains the first occurrence of+Inf(or-Inf) in the factorization stepK+1( whenKcolumns have been factorized ). π
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π References:
Okay bestie, the receipts are giving academic excellence β here's exactly where this algorithm's lore comes from:
[1]β A Level 3 BLAS QR factorization algorithm with column pivoting developed in 1996. G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain. X. Sun, Computer Science Dept., Duke University, USA. C. H. Bischof, Math. and Comp. Sci. Div., Argonne National Lab, USA. A BLAS-3 version of the QR factorization with column pivoting. LAPACK Working Note 114 and in SIAM J. Sci. Comput., 19(5):1486-1494, Sept. 1998.[2]β A partial column norm updating strategy developed in 2006. Z. Drmac and Z. Bujanovic, Dept. of Math., University of Zagreb, Croatia. On the failure of rank revealing QR factorization software β a case study. LAPACK Working Note 176. and in ACM Trans. Math. Softw. 35, 2, Article 12 (July 2008), 28 pages.
Contributors: π«Ά
These are the icons who contributed β exact text, no cap:
!>
!> November 2023, Igor Kozachenko, James Demmel,
!> EECS Department,
!> University of California, Berkeley, USA.
!>
!>
Not me being obsessed with the spacing β it's literally in the source. π
Definition at line 340 of file dlaqp2rk.f.
Author β¨
Generated automatically by Doxygen for LAPACK from the source code.
π That's the whole page, bestie β LAPACK Version 3.12.0, sourced from /home/abui.../dlaqp2rk.f(3). Stay iconic, stay compiled. πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms