hetrf(3)
π
hetrf(3) β from the Library Functions Manual, bestie π
πΈ NAME πΈ
hetrf β {he,sy}trf: triangular factor
π¦ SYNOPSIS π¦
okay so bestie, you get six subroutine besties up in here β all iconic, all doing triangular-factor things π
β¨ Functions β¨
subroutine chetrf (uplo, n, a, lda, ipiv, work, lwork, info)
CHETRF
subroutine csytrf (uplo, n, a, lda, ipiv, work, lwork, info)
CSYTRF
subroutine dsytrf (uplo, n, a, lda, ipiv, work, lwork, info)
DSYTRF
subroutine ssytrf (uplo, n, a, lda, ipiv, work, lwork, info)
SSYTRF
subroutine zhetrf (uplo, n, a, lda, ipiv, work, lwork, info)
ZHETRF
subroutine zsytrf (uplo, n, a, lda, ipiv, work, lwork, info)
ZSYTRF
π Detailed Description π
bestie, the detailed description is literally the function documentation below β thatβs the whole vibe. π«Ά
π Function Documentation π
π subroutine chetrf π
subroutine chetrf (character uplo, integer n, complex, dimension( lda, * )
a, integer lda, integer, dimension( * ) ipiv, complex, dimension( * )
work, integer lwork, integer info)
CHETRF
π― Purpose
CHETRF computes the factorization of a complex Hermitian matrix A using the Bunch-Kaufman diagonal pivoting method. The form of the factorization is
A = U*D*U**H or A = L*D*L**H
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, 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. β¨
π Parameters
UPLOβCHARACTER*1π= 'U': Upper triangle of A is stored;= 'L': Lower triangle of A is stored.
NβINTEGER. The order of the matrix A.N >= 0.AβCOMPLEX array, dimension (LDA,N). On entry, the Hermitian matrix A. IfUPLO = '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. IfUPLO = '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, the block diagonal matrix D and the multipliers used to obtain the factor U or L (see below for further details).LDAβINTEGER. The leading dimension of the array A.LDA >= max(1,N).IPIVβINTEGER array, dimension (N). Details of the interchanges and the block structure of D.- If
IPIV(k) > 0, then rows and columns k andIPIV(k)were interchanged andD(k,k)is a 1-by-1 diagonal block. - If
UPLO = 'U'andIPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and-IPIV(k)were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. - If
UPLO = 'L'andIPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and-IPIV(k)were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block.
- If
WORKβCOMPLEX array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβINTEGER. The length of WORK.LWORK >= 1. For best performanceLWORK >= N*NB, whereNBis the block size returned byILAENV.INFOβINTEGER.= 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value> 0: ifINFO = i,D(i,i)is exactly zero. 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.
bestie, that INFO > 0 case is not a cute little warning β D is singular, and division by zero is gonna happen if you try to solve a system of equations with it. no cap. π
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π§ Further Details:
If UPLO = 'U', then
A = U*D*U**H
where
U = P(n)*U(n)* ... *P(k)U(k)* ...,
i.e., U is a product of terms P(k)*U(k), where k decreases from n to 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and U(k) is a unit upper triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I v 0 ) k-s
U(k) = ( 0 I 0 ) s
( 0 0 I ) n-k
k-s s n-k
If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), and A(k,k), and v overwrites A(1:k-2,k-1:k).
If UPLO = 'L', then
A = L*D*L**H
where
L = P(1)*L(1)* ... *P(k)*L(k)* ...,
i.e., L is a product of terms P(k)*L(k), where k increases from 1 to n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and L(k) is a unit lower triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I 0 0 ) k-1
L(k) = ( 0 I 0 ) s
( 0 v I ) n-k-s+1
k-1 s n-k-s+1
If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k), and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
π Definition at line 176 of file chetrf.f.
π subroutine csytrf π
subroutine csytrf (character uplo, integer n, complex, dimension( lda, * )
a, integer lda, integer, dimension( * ) ipiv, complex, dimension( * )
work, integer lwork, integer info)
CSYTRF
π― Purpose
CSYTRF computes the factorization of a complex symmetric matrix A using the Bunch-Kaufman diagonal pivoting method. The form of the factorization is
A = U*D*U**T or A = L*D*L**T
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric 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. β¨
π Parameters
UPLOβCHARACTER*1π= 'U': Upper triangle of A is stored;= 'L': Lower triangle of A is stored.
NβINTEGER. The order of the matrix A.N >= 0.AβCOMPLEX array, dimension (LDA,N). On entry, the symmetric matrix A. IfUPLO = '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. IfUPLO = '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, the block diagonal matrix D and the multipliers used to obtain the factor U or L (see below for further details).LDAβINTEGER. The leading dimension of the array A.LDA >= max(1,N).IPIVβINTEGER array, dimension (N). Details of the interchanges and the block structure of D.- If
IPIV(k) > 0, then rows and columns k andIPIV(k)were interchanged andD(k,k)is a 1-by-1 diagonal block. - If
UPLO = 'U'andIPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and-IPIV(k)were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. - If
UPLO = 'L'andIPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and-IPIV(k)were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block.
- If
WORKβCOMPLEX array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.LWORKβINTEGER. The length of WORK.LWORK >=1. For best performanceLWORK >= N*NB, whereNBis the block size returned byILAENV. IfLWORK = -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 byXERBLA.INFOβINTEGER.= 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value> 0: ifINFO = i,D(i,i)is exactly zero. 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.
same energy as before, bestie: INFO > 0 means D is exactly singular, and using it to solve a system of equations will hit division by zero. π
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π§ Further Details:
okay so back to the math, bestie, because this is where it actually gets cute π
If UPLO = 'U', then A = U*D*U**T, where
U = P(n)*U(n)* ... *P(k)U(k)* ...,
i.e., U is a product of terms P(k)*U(k), where k decreases from n to 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and U(k) is a unit upper triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I v 0 ) k-s
U(k) = ( 0 I 0 ) s
( 0 0 I ) n-k
k-s s n-k
If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), and A(k,k), and v overwrites A(1:k-2,k-1:k).
If UPLO = 'L', then A = L*D*L**T, where
L = P(1)*L(1)* ... *P(k)*L(k)* ...,
i.e., L is a product of terms P(k)*L(k), where k increases from 1 to n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and L(k) is a unit lower triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I 0 0 ) k-1
L(k) = ( 0 I 0 ) s
( 0 v I ) n-k-s+1
k-1 s n-k-s+1
If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k), and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
Definition at line 181 of file csytrf.f.
π©΅ dsytrf β the double precision twin π©΅
subroutine dsytrf (character uplo, integer n, double precision, dimension(
lda, * ) a, integer lda, integer, dimension( * ) ipiv, double precision,
dimension( * ) work, integer lwork, integer info)
DSYTRF β say it with me: D-S-Y-T-R-F. Iconic. π
Purpose β the why π
DSYTRF computes the factorization of a real symmetric matrix A using the Bunch-Kaufman diagonal pivoting method. The form of the factorization is
A = U**T*D*U or A = L*D*L**T
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric 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. blocked = faster, Level 3 BLAS = the popular girls of linear algebra, we love to see it π₯
Parameters β the whole cast π
UPLOβUPLO is CHARACTER*1, and it's literally just "which triangle are we doing?"= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NβN is INTEGER, the order of the matrixA.N >= 0. Zero is allowed, she's flexible like that β¨AβA is DOUBLE PRECISION array, dimension (LDA,N).- On entry, the symmetric matrix
A. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced. the other half is giving background extra, we don't look at her π - On exit, the block diagonal matrix
Dand the multipliers used to obtain the factorUorL(see below for further details). she got a whole glow-up on the way out, obsessed π¦
- On entry, the symmetric matrix
LDAβLDA is INTEGER, the leading dimension of the arrayA.LDA >= max(1,N). no cap, respect themax(1,N)πIPIVβIPIV is INTEGER array, dimension (N), and it's lowkey the receipts for everything that happened:- Details of the interchanges and the block structure of
D. - If
IPIV(k) > 0, then rows and columnskandIPIV(k)were interchanged andD(k,k)is a 1-by-1 diagonal block. - If
UPLO = 'U'andIPIV(k) = IPIV(k-1) < 0, then rows and columnsk-1and-IPIV(k)were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. - If
UPLO = 'L'andIPIV(k) = IPIV(k+1) < 0, then rows and columnsk+1and-IPIV(k)were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block. - (yes the negative numbers mean a 2-by-2 block, and yes the UPLO changes whether you look at
k-1ork+1. it's giving "read carefully bestie" π)
- Details of the interchanges and the block structure of
WORKβWORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. she's a workspace with a purpose πLWORKβLWORK is INTEGER, the length ofWORK.LWORK >= 1. For best performanceLWORK >= N*NB, whereNBis the block size returned byILAENV. 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.LWORK = -1is the "just tell me what you need, queen" setting πINFOβINFO is INTEGER, the vibe report:= 0: successful exit. slay π< 0: ifINFO = -i, thei-th argument had an illegal value.> 0: ifINFO = i,D(i,i)is exactly zero. The factorization has been completed, but the block diagonal matrixDis exactly singular, and division by zero will occur if it is used to solve a system of equations. not a drill, that's an actual π moment, do not proceed to the solve.
Author π
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Further Details β the sequel π
If UPLO = 'U', then A = U**T*D*U, where
U = P(n)*U(n)* ... *P(k)U(k)* ...,
i.e., U is a product of terms P(k)*U(k), where k decreases from n to 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and U(k) is a unit upper triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I v 0 ) k-s
U(k) = ( 0 I 0 ) s
( 0 0 I ) n-k
k-s s n-k
If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k).
If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), and A(k,k), and v overwrites A(1:k-2,k-1:k).
If UPLO = 'L', then A = L*D*L**T, where
L = P(1)*L(1)* ... *P(k)*L(k)* ...,
i.e., L is a product of terms P(k)*L(k), where k increases from 1 to n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and L(k) is a unit lower triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I 0 0 ) k-1
L(k) = ( 0 I 0 ) s
( 0 v I ) n-k-s+1
k-1 s n-k-s+1
If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k).
If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k), and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
Definition at line 181 of file dsytrf.f.
π ssytrf β same energy, single precision π
subroutine ssytrf (character uplo, integer n, real, dimension( lda, * ) a,
integer lda, integer, dimension( * ) ipiv, real, dimension( * ) work,
integer lwork, integer info)
SSYTRF β the S is for single precision, and she is just as booked and busy as her double-precision sister π
Purpose β the why πΈ
SSYTRF computes the factorization of a real symmetric matrix A using the Bunch-Kaufman diagonal pivoting method. The form of the factorization is
A = U**T*D*U or A = L*D*L**T
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric 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. same algorithm, same level 3 BLAS energy, just REAL instead of DOUBLE PRECISION β ifykYK β¨
Parameters β the cast, part two π§
UPLOβUPLO is CHARACTER*1= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NβN is INTEGER, the order of the matrixA.N >= 0.AβA is REAL array, dimension (LDA,N).- On entry, the symmetric matrix
A. IfUPLO = 'U', the leadingN-by-Nupper triangular part ofAcontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. IfUPLO = 'L', the leadingN-by-Nlower triangular part ofAcontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced. one triangle only, the other one is literally not invited π«Ά - On exit, the block diagonal matrix
Dand the multipliers used to obtain the factorUorL(see below for further details).
- On entry, the symmetric matrix
LDAβLDA is INTEGER, the leading dimension of the arrayA.LDA >= max(1,N).IPIVβIPIV is INTEGER array, dimension (N). Details of the interchanges and the block structure ofD:- If
IPIV(k) > 0, then rows and columnskandIPIV(k)were interchanged andD(k,k)is a 1-by-1 diagonal block. - If
UPLO = 'U'andIPIV(k) = IPIV(k-1) < 0, then rows and columnsk-1and-IPIV(k)were interchanged andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. - If
UPLO = 'L'andIPIV(k) = IPIV(k+1) < 0, then rows and columnsk+1and-IPIV(k)were interchanged andD(k:k+1,k:k+1)is a 2-by-2 diagonal block.
- If
WORKβWORK is REAL array, dimension (MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK.
and LWORK is literally right there waiting to spill her tea π
LWORKβINTEGER, bestie, and it's literally just the length ofWORK. Rules:LWORK >= 1. For best performance you wantLWORK >= N*NB, whereNBis the block size returned byILAENV. π«Ά
And the iconic bit: if LWORK = -1, a workspace query is assumed. The routine then only calculates the optimal size of the WORK array, hands that value back as the first entry of the WORK array, and β get this β no error message related to LWORK is issued by XERBLA. So you can ask "how much room do I need?" without getting yelled at. π
INFOβINTEGER, the vibe check at the end. Here's the tea β:= 0: successful exit β¨< 0: ifINFO = -i, the i-th argument had an illegal value π> 0: ifINFO = i,D(i,i)is exactly zero. The factorization has been completed, but the block diagonal matrixDis exactly singular, and division by zero will occur if it is used to solve a system of equations. π Like, the factorization worked, but it's giving "do not pass go."
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Further Details:
Okay so here's where it gets gorgeous β the actual shape of the factorization.
If UPLO = 'U', then A = U**T*D*U, where
U = P(n)*U(n)* ... *P(k)U(k)* ...,
i.e., U is a product of terms P(k)*U(k), where k decreases from n to 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and U(k) is a unit upper triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I v 0 ) k-s
U(k) = ( 0 I 0 ) s
( 0 0 I ) n-k
k-s s n-k
- If
s = 1,D(k)overwritesA(k,k), andvoverwritesA(1:k-1,k). - If
s = 2, the upper triangle ofD(k)overwritesA(k-1,k-1),A(k-1,k), andA(k,k), andvoverwritesA(1:k-2,k-1:k).
If UPLO = 'L', then A = L*D*L**T, where
L = P(1)*L(1)* ... *P(k)*L(k)* ...,
i.e., L is a product of terms P(k)*L(k), where k increases from 1 to n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and L(k) is a unit lower triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I 0 0 ) k-1
L(k) = ( 0 I 0 ) s
( 0 v I ) n-k-s+1
k-1 s n-k-s+1
- If
s = 1,D(k)overwritesA(k,k), andvoverwritesA(k+1:n,k). - If
s = 2, the lower triangle ofD(k)overwritesA(k,k),A(k+1,k), andA(k+1,k+1), andvoverwritesA(k+2:n,k:k+1).
Definition at line 181 of file ssytrf.f. β
π¦ subroutine zhetrf
subroutine zhetrf (character uplo, integer n, complex*16, dimension( lda, * ) a, integer lda, integer, dimension( * ) ipiv, complex*16, dimension( * ) work, integer lwork, integer info)
ZHETRF β say it with me, this one's the complex Hermitian icon. π
β¨ Purpose:
ZHETRF computes the factorization of a complex Hermitian matrix A using the Bunch-Kaufman diagonal pivoting method. The form of the factorization is
A = U*D*U**H or A = L*D*L**H
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, 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. Highkey the glow-up version of the unblocked one. π₯
π Parameters
UPLOβCHARACTER*1, choose your fighter:= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NβINTEGER, the order of the matrixA.N >= 0.AβCOMPLEX*16array, 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. π (Like, don't even worry about the other half, she's not looking.)
On exit, the block diagonal matrix D and the multipliers used to obtain the factor U or L (see below for further details). π«Ά
LDAβINTEGER, the leading dimension of the arrayA.LDA >= max(1,N).IPIVβINTEGERarray, dimension(N). Details of the interchanges and the block structure ofD. Pay attention, this is the whole map πΊοΈ:- If
IPIV(k) > 0, then rows and columnskandIPIV(k)were interchanged andD(k,k)is a1-by-1diagonal block. - If
UPLO = 'U'andIPIV(k) = IPIV(k-1) < 0, then rows and columnsk-1and-IPIV(k)were interchanged andD(k-1:k,k-1:k)is a2-by-2diagonal block. - If
UPLO = 'L'andIPIV(k) = IPIV(k+1) < 0, then rows and columnsk+1and-IPIV(k)were interchanged andD(k:k+1,k:k+1)is a2-by-2diagonal block.
- If
Note the negative signs β those are how you know it's a 2-by-2 situation. No cap. π
WORKβCOMPLEX*16array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. β¨LWORKβINTEGER, the length ofWORK.LWORK >= 1. For best performanceLWORK >= N*NB, whereNBis the block size returned byILAENV. π§INFOβINTEGER, the final verdict:= 0: successful exit π< 0: ifINFO = -i, the i-th argument had an illegal value> 0: ifINFO = i,D(i,i)is exactly zero. The factorization has been completed, but the block diagonal matrixDis exactly singular, and division by zero will occur if it is used to solve a system of equations. π
π Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Further Details:
If UPLO = 'U', then A = U*D*U**H, where
U = P(n)*U(n)* ... *P(k)U(k)* ...,
i.e., U is a product of terms P(k)*U(k), where k decreases from n to 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and U(k) is a unit upper triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I v 0 ) k-s
U(k) = ( 0 I 0 ) s
( 0 0 I ) n-k
k-s s n-k
- If
s = 1,D(k)overwritesA(k,k), andvoverwritesA(1:k-1,k). - If
s = 2, the upper triangle ofD(k)overwritesA(k-1,k-1),A(k-1,k), andA(k,k), andvoverwritesA(1:k-2,k-1:k).
If UPLO = 'L', then A = L*D*L**H, where
L = P(1)*L(1)* ... *P(k)*L(k)* ...,
i.e., L is a product of terms P(k)*L(k), where k increases from 1 to n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and L(k) is a unit lower triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I 0 0 ) k-1
L(k) = ( 0 I 0 ) s
( 0 v I ) n-k-s+1
k-1 s n-k-s+1
- If
s = 1,D(k)overwritesA(k,k), andvoverwritesA(k+1:n,k). - If
s = 2, the lower triangle ofD(k)overwritesA(k,k),A(k+1,k), andA(k+1,k+1), andvoverwritesA(k+2:n,k:k+1).
Definition at line 176 of file zhetrf.f. π¦
πΈ subroutine zsytrf
subroutine zsytrf (character uplo, integer n, complex*16, dimension( lda, * ) a, integer lda, integer, dimension( * ) ipiv, complex*16, dimension( * ) work, integer lwork, integer info)
ZSYTRF β the complex symmetric sibling. Same energy, different conjugation situation. π
β¨ Purpose:
ZSYTRF computes the factorization of a complex symmetric matrix A using the Bunch-Kaufman diagonal pivoting method. The form of the factorization is
A = U*D*U**T or A = L*D*L**T
where U (or L) is a product of permutation and unit upper (lower) triangular matrices, and D is symmetric 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. π₯
π Parameters
UPLOβCHARACTER*1:= 'U': Upper triangle ofAis stored;= 'L': Lower triangle ofAis stored.
NβINTEGER, the order of the matrixA.N >= 0.AβCOMPLEX*16array, dimension(LDA,N).
On entry, the symmetric 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, the block diagonal matrix D and the multipliers used to obtain the factor U or L (see below for further details). β¨
LDAβINTEGER, the leading dimension of the arrayA.LDA >= max(1,N).IPIVβIPIVβ anINTEGERarray, dimension(N). This is the receipts section bestie π it holds the details of the interchanges and the block structure ofD.- If
IPIV(k) > 0, then rows and columnskandIPIV(k)were interchanged, andD(k,k)is a 1-by-1 diagonal block. - If
UPLO = 'U'andIPIV(k) = IPIV(k-1) < 0, then rows and columnsk-1and-IPIV(k)were interchanged, andD(k-1:k,k-1:k)is a 2-by-2 diagonal block. - If
UPLO = 'L'andIPIV(k) = IPIV(k+1) < 0, then rows and columnsk+1and-IPIV(k)were interchanged, andD(k:k+1,k:k+1)is a 2-by-2 diagonal block.
- If
WORKβ aCOMPLEX*16array, dimension(MAX(1,LWORK)). On exit, ifINFO = 0,WORK(1)returns the optimalLWORK. She's the scratch pad and she also does fortune-telling, we love a multi-hyphenate queen β¨LWORKβINTEGER, the length ofWORK.LWORK >= 1. For best performance,LWORK >= N*NB, whereNBis the block size returned byILAENV. Like, she'll work with the minimum, but she won't be happy about it π₯²- If
LWORK = -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. Basically you're just asking "how much room do I need" and she answers without complaining πΈ
- If
INFOβINTEGER. The vibe check at the end, no cap π= 0: successful exit π< 0: ifINFO = -i, thei-th argument had an illegal value> 0: ifINFO = i,D(i,i)is exactly zero. The factorization has been completed, but the block diagonal matrixDis exactly singular, and division by zero will occur if it is used to solve a system of equations. π¨ that's the danger zone, do NOT try to solve with it
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Further Details:
okay so this is the part where she explains the whole fit π
If UPLO = 'U', then A = U*D*U**T, where
U = P(n)*U(n)* ... *P(k)U(k)* ...,
i.e., U is a product of terms P(k)*U(k), where k decreases from n to 1 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and U(k) is a unit upper triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I v 0 ) k-s
U(k) = ( 0 I 0 ) s
( 0 0 I ) n-k
k-s s n-k
If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k). If s = 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), and A(k,k), and v overwrites A(1:k-2,k-1:k).
If UPLO = 'L', then A = L*D*L**T, where
L = P(1)*L(1)* ... *P(k)*L(k)* ...,
i.e., L is a product of terms P(k)*L(k), where k increases from 1 to n in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined by IPIV(k), and L(k) is a unit lower triangular matrix, such that if the diagonal block D(k) is of order s (s = 1 or 2), then
( I 0 0 ) k-1
L(k) = ( 0 I 0 ) s
( 0 v I ) n-k-s+1
k-1 s n-k-s+1
If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k). If s = 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k), and A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
Definition at line 181 of file zsytrf.f.
(no that is not a typo, that is genuinely what the source says, iykyk π«Ά)
π Author π
Generated automatically by Doxygen for LAPACK from the source code. Not a human, not a girlie, just a parser doing her little thing π
okay bestie that's the whole page, you made it to the end!! π₯³π huge slay. this is hetrf(3) from LAPACK, Version 3.12.0 β go forth and factorize responsibly, and remember: if INFO > 0, put the matrix down and walk away π
β¨
π¦ 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