SLAQP2RK(3)
π¦ SLAQP2RK(3) π¦
okay so you opened SLAQP2RK(3) from the Library Functions Manual β the header is giving SLAQP2RK(3) / Library Functions Manual / slaqp2rk.f(3) energy, and I'm folding that manual name in right here so we can get to the actual tea. This is part 1, bestie, and it's lowkey a whole linear algebra moment. π
β¨
β¨ NAME β¨
the NAME line is literally this file path, no cap:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/slaqp2rk.f
(the original wraps after lapack-, but that's the exact path once you stitch it back together π«Ά)
π SYNOPSIS π
πΈ Functions/Subroutines πΈ
subroutine SLAQP2RK (m, n, nrhs, ioffset, kmax, abstol, reltol, kp1,
maxc2nrm, a, lda, k, maxc2nrmk, relmaxc2nrmk, jpiv, tau, vn1, vn2,
work, info)
SLAQP2RK 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. it's giving "QR but make it truncated" and honestly? iconic. π
π¦ Function/Subroutine Documentation π¦
subroutine SLAQP2RK (integer m, integer n, integer nrhs, integer ioffset,
integer kmax, real abstol, real reltol, integer kp1, real maxc2nrm,
real, dimension( lda, * ) a, integer lda, integer k, real maxc2nrmk,
real relmaxc2nrmk, integer, dimension( * ) jpiv, real, dimension( * )
tau, real, dimension( * ) vn1, real, dimension( * ) vn2, real,
dimension( * ) work, integer info)
SLAQP2RK 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. periodt. π
π― Purpose: π―
so SLAQP2RK 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).
the routine uses Level 2 BLAS. the block A(1:IOFFSET,1:N) is accordingly pivoted, but not factorized. π¦
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. no cap, that's the whole vibe. π
π Parameters π
bestie, every single parameter is here, no skipping, no "oh I'll just skim it" β we are doing the full tour. π«Ά
π M π
M is INTEGER. the number of rows of the matrix A. M >= 0.
π N π
N is INTEGER. the number of columns of the matrix A. N >= 0.
π NRHS π
NRHS is INTEGER. the number of right hand sides, i.e., the number of columns of the matrix B. NRHS >= 0.
π IOFFSET π
IOFFSET is INTEGER. the number of rows of the matrix A that 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. π
π KMAX π
KMAX is INTEGER. the first factorization stopping criterion. KMAX >= 0.
the maximum number of columns of the 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. this means that the factorization is not performed, the matrices A and B and the arraysTAU,IPIVare not modified.
π ABSTOL π
ABSTOL is DOUBLE PRECISION, cannot be NaN. the second factorization stopping criterion.
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 be NaN. the third factorization stopping criterion.
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. (yes, it'sd), notc)β keeping the original's lettering exactly, bestie π)
π KP1 π
KP1 is INTEGER. the index of the column with the maximum 2-norm in the whole original matrix A_orig determined in the main routine SGEQP3RK. 1 <= KP1 <= N_orig_mat.
π MAXC2NRM π
MAXC2NRM is DOUBLE PRECISION. the maximum column 2-norm of the whole original matrix A_orig computed in the main routine SGEQP3RK. MAXC2NRM >= 0.
π A π
A is REAL 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 the matrix A stored in
A(IOFFSET+1:M,1:K)is the triangular factor obtained. - the block of the matrix A stored in
A(1:IOFFSET,1:N)has been accordingly pivoted, but not factorized. - the rest of the array A, block
A(IOFFSET+1:M,K+1:N+NRHS). the left partA(IOFFSET+1:M,K+1:N)of this block contains the residual of the matrix A, and, ifNRHS > 0, the right part of the blockA(IOFFSET+1:M,N+1:N+NRHS)contains the block of the right-hand-side matrix B. both these blocks have been updated by multiplication from the left byQ(K)**T.
π LDA π
LDA is INTEGER. the leading dimension of the array A. LDA >= max(1,M).
π K π
K is INTEGER. factorization rank of the matrix A, i.e. the rank of the factor R, which is the same as the number of non-zero rows of the factor R. 0 <= K <= min(M-IOFFSET,KMAX,N).
K also represents the number of non-zero Householder vectors. π
π MAXC2NRMK π
MAXC2NRMK is DOUBLE PRECISION. the maximum column 2-norm of the residual matrix, when the factorization stopped at rank K. MAXC2NRMK >= 0.
π RELMAXC2NRMK π
RELMAXC2NRMK is DOUBLE PRECISION. the ratio MAXC2NRMK / MAXC2NRM of the maximum column 2-norm of the residual matrix (when the factorization stopped at rank K) to the maximum column 2-norm of the whole original matrix A. RELMAXC2NRMK >= 0.
π JPIV π
JPIV is INTEGER array, dimension (N). column pivot indices, for 1 <= j <= N, column j of the matrix A was interchanged with column JPIV(j).
π TAU π
TAU is REAL array, dimension (min(M-IOFFSET,N)). the scalar factors of the elementary reflectors.
π VN1 π
VN1 is REAL array, dimension (N). the vector with the partial column norms.
π VN2 π
VN2 is REAL array, dimension (N). the vector with the exact column norms.
π WORK π
WORK is REAL array, dimension (N-1). used in SLARF subroutine to apply an elementary reflector from the left.
π INFO π
INFO is INTEGER.
INFO = 0: successful exit.- if
INFO = j_1, where1 <= j_1 <= N, then NaN was detected and the routine stops the computation. thej_1-th column of the matrix A or thej_1-th element of arrayTAUcontains the first occurrence of NaN in the factorization stepK+1( when K columns have been factorized ).
on exit:
Kis set to the number of factorized columns without exception.MAXC2NRMKis set to NaN.RELMAXC2NRMKis set to NaN.TAU(K+1:min(M,N))is not set and contains undefined elements. ifj_1=K+1,TAU(K+1)may contain NaN.
- if
INFO = j_2, whereN+1 <= j_2 <= 2*N, then no NaN was detected, but+Inf(or-Inf) was detected and the routine continues the computation until completion. the(j_2-N)-th column of the matrix A contains the first occurrence of+Inf(or-Inf) in the factorization stepK+1( when K columns have been factorized ).
π Author π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
References β the receipts πβ¨
- 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.
- 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 lovely humans are credited right here, bestie:
!>
!> November 2023, Igor Kozachenko, James Demmel,
!> EECS Department,
!> University of California, Berkeley, USA.
!>
!>
Definition at line 340 of file slaqp2rk.f.
π Author π
Generated automatically by Doxygen for LAPACK from the source code.
This pageβs footer vibe is LAPACK Version 3.12.0, straight from /home/abui.../slaqp2rk.f(3) β signed, sealed, slayed ππ
π
π¦ 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