/home/abui...hetrf_rk.f(3)
π CHETRF_RK β the girlies are factoring a complex Hermitian indefinite matrix π
Okay so bestie, this page is from the LAPACK library manual β specifically the function doc for /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/chetrf_rk.f. Yes that path is a whole mouthful, no cap. Come sit with me, we're learning linear algebra and it's gonna slay.
β¨ SYNOPSIS β¨
Functions/Subroutines π«Ά
subroutine CHETRF_RK (uplo, n, a, lda, e, ipiv, work, lwork, info)
CHETRF_RK computes the factorization of a complex Hermitian indefinite matrix using the bounded Bunch-Kaufman (rook) diagonal pivoting method (BLAS3 blocked algorithm). Iconic behavior honestly.
πΈ Function/Subroutine Documentation πΈ
subroutine CHETRF_RK (character uplo, integer n, complex, dimension( lda, * ) a,
integer lda, complex, dimension( * ) e, integer, dimension( * ) ipiv,
complex, dimension( * ) work, integer lwork, integer info)
CHETRF_RK computes the factorization of a complex Hermitian indefinite matrix using the bounded Bunch-Kaufman (rook) diagonal pivoting method (BLAS3 blocked algorithm). She's giving main character energy fr fr.
π Purpose π
!> CHETRF_RK computes the factorization of a complex Hermitian matrix A !> using the bounded Bunch-Kaufman (rook) diagonal pivoting method: !> !> A = P*U*D*(UH)(PT) or A = PL*D*(LH)*(PT), !> !> where U (or L) is unit upper (or lower) triangular matrix, !> UH (or LH) is the conjugate of U (or L), P is a permutation !> matrix, P**T is the transpose of P, and D is Hermitian and block !> diagonal with 1-by-1 and 2-by-2 diagonal blocks. !> !> This is the blocked version of the algorithm, calling Level 3 BLAS. !> For more information see Further Details section. !>
So like β she breaks A all the way down into pieces. Ate and left no crumbs π . And this is the blocked version, meaning she's calling Level 3 BLAS (the fast one, the popular one). For more tea, see the Further Details section.
π Parameters π
π UPLO
!> UPLO is CHARACTER*1 !> Specifies whether the upper or lower triangular part of the !> Hermitian matrix A is stored: !> = 'U': Upper triangular !> = 'L': Lower triangular !>
CHARACTER*1, queen. Which triangle of A are we storing? Pick one:
'U'β upper triangular β¨'L'β lower triangular π
π N
!> N is INTEGER !> The order of the matrix A. N >= 0. !>
INTEGER, and it's the order of the matrix A. Lowkey simple: N >= 0.
π A
!> A is COMPLEX array, dimension (LDA,N) !> On entry, the Hermitian matrix A. !> If UPLO = 'U': the leading N-by-N upper triangular part !> of A contains the upper triangular part of the matrix A, !> and the strictly lower triangular part of A is not !> referenced. !> !> If UPLO = 'L': the leading N-by-N lower triangular part !> of A contains the lower triangular part of the matrix A, !> and the strictly upper triangular part of A is not !> referenced. !> !> On exit, contains: !> a) ONLY diagonal elements of the Hermitian block diagonal !> matrix D on the diagonal of A, i.e. D(k,k) = A(k,k); !> (superdiagonal (or subdiagonal) elements of D !> are stored on exit in array E), and !> b) If UPLO = 'U': factor U in the superdiagonal part of A. !> If UPLO = 'L': factor L in the subdiagonal part of A. !>
COMPLEX array, dimension (LDA,N). On entry she holds the Hermitian matrix A:
- If
UPLO = 'U': the leadingN-by-Nupper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced (she doesn't even look at it, periodt). - If
UPLO = 'L': the leadingN-by-Nlower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced.
On exit she contains:
- a) ONLY diagonal elements of the Hermitian block diagonal matrix D on the diagonal of A, i.e.
D(k,k) = A(k,k); (superdiagonal (or subdiagonal) elements of D are stored on exit in arrayE), and - b) If
UPLO = 'U': factor U in the superdiagonal part of A. IfUPLO = 'L': factor L in the subdiagonal part of A.
π LDA
!> LDA is INTEGER !> The leading dimension of the array A. LDA >= max(1,N). !>
INTEGER. Leading dimension of the array A. And listen: LDA >= max(1,N) β that's the vibe check, don't fail it π.
π E
!> E is COMPLEX array, dimension (N) !> On exit, contains the superdiagonal (or subdiagonal) !> elements of the Hermitian block diagonal matrix D !> with 1-by-1 or 2-by-2 diagonal blocks, where !> If UPLO = 'U': E(i) = D(i-1,i), i=2:N, E(1) is set to 0; !> If UPLO = 'L': E(i) = D(i+1,i), i=1:N-1, E(N) is set to 0. !> !> NOTE: For 1-by-1 diagonal block D(k), where !> 1 <= k <= N, the element E(k) is set to 0 in both !> UPLO = 'U' or UPLO = 'L' cases. !>
COMPLEX array, dimension (N). On exit she's holding the superdiagonal (or subdiagonal) elements of the Hermitian block diagonal matrix D, which has 1-by-1 or 2-by-2 diagonal blocks. Specifically:
- If
UPLO = 'U':E(i) = D(i-1,i),i=2:N,E(1)is set to0; - If
UPLO = 'L':E(i) = D(i+1,i),i=1:N-1,E(N)is set to0.
NOTE bestie: for a 1-by-1 diagonal blockD(k), where1 <= k <= N, the elementE(k)is set to0in both theUPLO = 'U'andUPLO = 'L'cases. Both. π
π IPIV
!> IPIV is INTEGER array, dimension (N) !> IPIV describes the permutation matrix P in the factorization !> of matrix A as follows. The absolute value of IPIV(k) !> represents the index of row and column that were !> interchanged with the k-th row and column. The value of UPLO !> describes the order in which the interchanges were applied. !> Also, the sign of IPIV represents the block structure of !> the Hermitian block diagonal matrix D with 1-by-1 or 2-by-2 !> diagonal blocks which correspond to 1 or 2 interchanges !> at each factorization step. For more info see Further !> Details section. !> !> If UPLO = 'U', !> ( in factorization order, k decreases from N to 1 ): !> a) A single positive entry IPIV(k) > 0 means: !> D(k,k) is a 1-by-1 diagonal block. !> If IPIV(k) != k, rows and columns k and IPIV(k) were !> interchanged in the matrix A(1:N,1:N); !> If IPIV(k) = k, no interchange occurred. !> !> b) A pair of consecutive negative entries !> IPIV(k) < 0 and IPIV(k-1) < 0 means: !> D(k-1:k,k-1:k) is a 2-by-2 diagonal block. !> (NOTE: negative entries in IPIV appear ONLY in pairs). !> 1) If -IPIV(k) != k, rows and columns !> k and -IPIV(k) were interchanged !> in the matrix A(1:N,1:N). !> If -IPIV(k) = k, no interchange occurred. !> 2) If -IPIV(k-1) != k-1, rows and columns !> k-1 and -IPIV(k-1) were interchanged !> in the matrix A(1:N,1:N). !> If -IPIV(k-1) = k-1, no interchange occurred. !> !> c) In both cases a) and b), always ABS( IPIV(k) ) <= k. !> !> d) NOTE: Any entry IPIV(k) is always NONZERO on output. !> !> If UPLO = 'L', !> ( in factorization order, k increases from 1 to N ): !> a) A single positive entry IPIV(k) > 0 means: !> D(k,k) is a 1-by-1 diagonal block. !> If IPIV(k) != k, rows and columns k and IPIV(k) were !> interchanged in the matrix A(1:N,1:N). !> If IPIV(k) = k, no interchange occurred. !> !> b) A pair of consecutive negative entries !> IPIV(k) < 0 and IPIV(k+1) < 0 means: !> D(k:k+1,k:k+1) is a 2-by-2 diagonal block. !> (NOTE: negative entries in IPIV appear ONLY in pairs). !> 1) If -IPIV(k) != k, rows and columns !> k and -IPIV(k) were interchanged !> in the matrix A(1:N,1:N). !> If -IPIV(k) = k, no interchange occurred. !> 2) If -IPIV(k+1) != k+1, rows and columns !> k-1 and -IPIV(k-1) were interchanged !> in the matrix A(1:N,1:N). !> If -IPIV(k+1) = k+1, no interchange occurred. !> !> c) In both cases a) and b), always ABS( IPIV(k) ) >= k. !> !> d) NOTE: Any entry IPIV(k) is always NONZERO on output. !>
INTEGER array, dimension (N). Okay this one's the β¨loreβ¨ β IPIV describes the permutation matrix P in the factorization of matrix A, like this:
- The absolute value of
IPIV(k)= the index of the row and column that were interchanged with the k-th row and column. - The value of
UPLOdescribes the order in which the interchanges were applied. - The sign of
IPIV= the block structure of the Hermitian block diagonal matrix D, with 1-by-1 or 2-by-2 diagonal blocks, which correspond to 1 or 2 interchanges at each factorization step.
For more info, see the Further Details section (she's mysterious like that).
π If UPLO = 'U' (in factorization order, k decreases from N to 1):
- a) A single positive entry
IPIV(k) > 0means:D(k,k)is a 1-by-1 diagonal block.- If
IPIV(k) != k, rows and columnskandIPIV(k)were interchanged in the matrixA(1:N,1:N); - If
IPIV(k) = k, no interchange occurred.
- If
- b) A pair of consecutive negative entries
IPIV(k) < 0andIPIV(k-1) < 0means:D(k-1:k,k-1:k)is a 2-by-2 diagonal block.- (NOTE: negative entries in
IPIVappear ONLY in pairs π―). - 1) If
-IPIV(k) != k, rows and columnskand-IPIV(k)were interchanged in the matrixA(1:N,1:N). If-IPIV(k) = k, no interchange occurred. - 2) If
-IPIV(k-1) != k-1, rows and columnsk-1and-IPIV(k-1)were interchanged in the matrixA(1:N,1:N). If-IPIV(k-1) = k-1, no interchange occurred.
- (NOTE: negative entries in
- c) In both cases a) and b), always
ABS( IPIV(k) ) <= k. - d) NOTE: Any entry
IPIV(k)is always NONZERO on output. Every single one. π
π If UPLO = 'L' (in factorization order, k increases from 1 to N):
- a) A single positive entry
IPIV(k) > 0means:D(k,k)is a 1-by-1 diagonal block.- If
IPIV(k) != k, rows and columnskandIPIV(k)were interchanged in the matrixA(1:N,1:N). - If
IPIV(k) = k, no interchange occurred.
- If
- b) A pair of consecutive negative entries
IPIV(k) < 0andIPIV(k+1) < 0means:D(k:k+1,k:k+1)is a 2-by-2 diagonal block.- (NOTE: negative entries in
IPIVappear ONLY in pairs π―). - 1) If
-IPIV(k) != k, rows and columnskand-IPIV(k)were interchanged in the matrixA(1:N,1:N). If-IPIV(k) = k, no interchange occurred. - 2) If
-IPIV(k+1) != k+1, rows and columnsk-1and-IPIV(k-1)were interchanged in the matrixA(1:N,1:N). If-IPIV(k+1) = k+1, no interchange occurred.
- (NOTE: negative entries in
- c) In both cases a) and b), always
ABS( IPIV(k) ) >= k. - d) NOTE: Any entry
IPIV(k)is always NONZERO on output. Yes, again. π«Ά
π WORK
!> WORK is COMPLEX array, dimension ( MAX(1,LWORK) ). !> On exit, if INFO = 0, WORK(1) returns the optimal LWORK. !>
COMPLEX array, dimension ( MAX(1,LWORK) ). On exit, if INFO = 0, then WORK(1) returns the optimal LWORK. She's a little messenger girlie π§.
π LWORK
!> LWORK is INTEGER !> The length of WORK. LWORK >=1. For best performance !> LWORK >= N*NB, where NB is the block size returned !> by ILAENV. !> !> 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. The length of WORK. LWORK >=1. For best performance, LWORK >= N*NB, where NB is the block size returned by ILAENV. (Bestie, best performance = the glow-up we deserve β¨.)
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. She's just window shopping, not buying ποΈ.
π INFO
!> INFO is INTEGER !> = 0: successful exit !> !> < 0: If INFO = -k, the k-th argument had an illegal value !> !> > 0: If INFO = k, the matrix A is singular, because: !> If UPLO = 'U': column k in the upper !> triangular part of A contains all zeros. !> If UPLO = 'L': column k in the lower !> triangular part of A contains all zeros. !> !> Therefore D(k,k) is exactly zero, and superdiagonal !> elements of column k of U (or subdiagonal elements of !> column k of L ) are all zeros. The factorization has !> been completed, but the block diagonal matrix D is !> exactly singular, and division by zero will occur if !> it is used to solve a system of equations. !> !> NOTE: INFO only stores the first occurrence of !> a singularity, any subsequent occurrence of singularity !> is not stored in INFO even though the factorization !> always completes. !>
INTEGER. The report card π:
= 0: successful exit π< 0: IfINFO = -k, the k-th argument had an illegal value π> 0: IfINFO = k, the matrix A is singular, because:- If
UPLO = 'U': columnkin the upper triangular part of A contains all zeros. - If
UPLO = 'L': columnkin the lower triangular part of A contains all zeros.
- If
Therefore D(k,k) is exactly zero, and superdiagonal elements of column k of U (or subdiagonal elements of column k of L) are all zeros. The factorization has been completed, but the block diagonal matrix D is exactly singular, and division by zero will occur if it is used to solve a system of equations. π Like, she finished her homework but the answer is cursed. Do not use it to solve a system, I'm begging.
NOTE:INFOonly stores the first occurrence of a singularity β any subsequent occurrence of singularity is not stored inINFOeven though the factorization always completes. First one gets the spotlight, the rest are background dancers. π
π¦ Author π¦
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
The whole squad co-signed this one π«Ά.
β Further Details: β
!> TODO: put correct description !>
Iβ π bestie they left a TODO in the manpage. That's the whole section. It's giving "finish your essay at 11:59pm." No cap, that's literally what it says.
πΈ Contributors: πΈ
!> !> December 2016, Igor Kozachenko, !> Computer Science Division, !> University of California, Berkeley !> !> September 2007, Sven Hammarling, Nicholas J. Higham, Craig Lucas, !> School of Mathematics, !> University of Manchester !> !>
December 2016 β Igor Kozachenko, Computer Science Division, University of California, Berkeley. September 2007 β Sven Hammarling, Nicholas J. Higham, Craig Lucas, School of Mathematics, University of Manchester. Legends, honestly π.
π Definition location π
Definition at line 257 of file chetrf_rk.f. Go look at line 257 if you want the raw source, iykyk.
π Author (of this page) π
Generated automatically by Doxygen for LAPACK from the source code. (Not me writing this by hand, the robots did it. Respect the robots π€π.)
LAPACK Β· Version 3.12.0 Β· /home/abui...hetrf_rk.f(3)
Okay that's the whole page bestie! Go factor a complex Hermitian indefinite matrix with the bounded Bunch-Kaufman (rook) diagonal pivoting method, BLAS3 blocked, and slay π β¨π
π¦ 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