hpgvx(3)
π hpgvx(3) π
okay so this is a page from the Library Functions Manual β the icon herself, hpgvx(3). no cap, this is the {hp,sp}gvx family: eig, bisection. that's the whole name section, bestie, we're already done with it. slay.
β¨ SYNOPSIS β¨
π Functions
subroutine chpgvx (itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)CHPGVXsubroutine dspgvx (itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)DSPGVXsubroutine sspgvx (itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, iwork, ifail, info)SSPGVXsubroutine zhpgvx (itype, jobz, range, uplo, n, ap, bp, vl, vu, il, iu, abstol, m, w, z, ldz, work, rwork, iwork, ifail, info)ZHPGVX
π¦ Detailed Description
literally the whole "detailed description" is just the function docs below. no extra lore, bestie. keep scrolling π
π Function Documentation
πΈ subroutine chpgvx
subroutine chpgvx (integer itype, character jobz, character range, character
uplo, integer n, complex, dimension( * ) ap, complex, dimension( * ) bp,
real vl, real vu, integer il, integer iu, real abstol, integer m, real,
dimension( * ) w, complex, dimension( ldz, * ) z, integer ldz, complex,
dimension( * ) work, real, dimension( * ) rwork, integer, dimension( * )
iwork, integer, dimension( * ) ifail, integer info)
CHPGVX π©·
β Purpose
okay so CHPGVX computes selected eigenvalues and, if you want them, eigenvectors of a complex generalized Hermitian-definite eigenproblem. the forms are:
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
here A and B are assumed to be Hermitian, stored in packed format, and B is also positive definite. you can pick which eigenvalues/eigenvectors you get by specifying either a range of values or a range of indices for the ones you want. choose your own adventure, but make it linear algebra β¨
π Parameters
ITYPEβ INTEGER. specifies the problem type to be solved, like:= 1: A*x = (lambda)*B*x= 2: A*B*x = (lambda)*x= 3: B*A*x = (lambda)*x
JOBZβ CHARACTER*1. do you want the eigenvectors or not, that is THE question:= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
RANGEβ CHARACTER*1. which ones are we finding:= 'A': all eigenvalues will be found;= 'V': all eigenvalues in the half-open interval (VL,VU]will be found;= 'I': the IL-th through IU-th eigenvalues will be found.
UPLOβ CHARACTER*1. which triangle did you actually store:= 'U': Upper triangles of A and B are stored;= 'L': Lower triangles of A and B are stored.
Nβ INTEGER. the order of the matricesAandB.N >= 0β¨APβ COMPLEX array, dimension(N*(N+1)/2). on entry, the upper or lower triangle of the Hermitian matrixA, packed columnwise in a linear array. the j-th column ofAis stored in the arrayAPas follows:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2*n-j)/2) = A(i,j)forj<=i<=n.
- if
on exit, the contents of AP are destroyed. π she's gone, bestie. don't come looking for her.
BPβ COMPLEX array, dimension(N*(N+1)/2). on entry, the upper or lower triangle of the Hermitian matrixB, packed columnwise in a linear array. the j-th column ofBis stored in the arrayBPas follows:- if
UPLO = 'U',BP(i + (j-1)*j/2) = B(i,j)for1<=i<=j; - if
UPLO = 'L',BP(i + (j-1)*(2*n-j)/2) = B(i,j)forj<=i<=n.
- if
on exit, the triangular factor U or L from the Cholesky factorization B = U**H*U or B = L*L**H, in the same storage format as B. glow up but make it factorization π«Ά
VLβ REAL. ifRANGE='V', the lower bound of the interval to be searched for eigenvalues.VL < VU. not referenced ifRANGE = 'A'or'I'.VUβ REAL. ifRANGE='V', the upper bound of the interval to be searched for eigenvalues.VL < VU. not referenced ifRANGE = 'A'or'I'.ILβ INTEGER. ifRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. not referenced ifRANGE = 'A'or'V'.IUβ INTEGER. ifRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. not referenced ifRANGE = 'A'or'V'.ABSTOLβ REAL. the absolute error tolerance for the eigenvalues. an approximate eigenvalue is accepted as converged when it is determined to lie in an interval[a,b]of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. if ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing AP to tridiagonal form.
eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*SLAMCH('S'), not zero. so like, don't set it to zero and then act surprised, okay?
if this routine returns withINFO>0, indicating that some eigenvectors did not converge, try settingABSTOLto2*SLAMCH('S'). that's the glow-up fix π
Mβ INTEGER. the total number of eigenvalues found.0 <= M <= N. ifRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1.Wβ REAL array, dimension(N). on normal exit, the firstMelements contain the selected eigenvalues in ascending order. she's organized, she's sorted, she's thriving β¨Zβ COMPLEX array, dimension(LDZ, N). ifJOBZ = 'N', thenZis not referenced. ifJOBZ = 'V', then ifINFO = 0, the firstMcolumns ofZcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with the i-th column ofZholding the eigenvector associated withW(i). the eigenvectors are normalized as follows:- if
ITYPE = 1or2,Z**H*B*Z = I; - if
ITYPE = 3,Z**H*inv(B)*Z = I.
- if
if an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL.
Note: the user must ensure that at leastmax(1,M)columns are supplied in the arrayZ; ifRANGE = 'V', the exact value ofMis not known in advance and an upper bound must be used. fr fr, size it generously. no cap.
LDZβ INTEGER. the leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKβ COMPLEX array, dimension(2*N).RWORKβ REAL array, dimension(7*N).IWORKβ INTEGER array, dimension(5*N).IFAILβ INTEGER array, dimension(N). ifJOBZ = 'V', then ifINFO = 0, the firstMelements ofIFAILare zero. ifINFO > 0, thenIFAILcontains the indices of the eigenvectors that failed to converge. ifJOBZ = 'N', thenIFAILis not referenced.INFOβ INTEGER. the whole personality, honestly:= 0: successful exitπ< 0: if INFO = -i, the i-th argument had an illegal value> 0: CPPTRF or CHPEVX returned an error code:<= N: if INFO = i, CHPEVX failed to converge;βieigenvectors failed to converge. their indices are stored in arrayIFAIL.> N: if INFO = N + i, for 1 <= i <= n, then the leadingprincipal minor of orderiofBis not positive. the factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed. π rough day for everyone.
π§ Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
π Contributors:
Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
Definition at line 274 of file chpgvx.f. π₯
πΈ subroutine dspgvx
subroutine dspgvx (integer itype, character jobz, character range, character
uplo, integer n, double precision, dimension( * ) ap, double precision,
dimension( * ) bp, double precision vl, double precision vu, integer il,
integer iu, double precision abstol, integer m, double precision,
dimension( * ) w, double precision, dimension( ldz, * ) z, integer ldz,
double precision, dimension( * ) work, integer, dimension( * ) iwork,
integer, dimension( * ) ifail, integer info)
DSPGVX π©·
β Purpose
DSPGVX computes selected eigenvalues, and optionally, eigenvectors, of a real generalized symmetric-definite eigenproblem, of the form
A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x.
here A and B are assumed to be symmetric, stored in packed storage, and B is also positive definite. eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. same energy, real numbers, still iconic π
π Parameters
ITYPEβ INTEGER. specifies the problem type to be solved:= 1: A*x = (lambda)*B*x= 2: A*B*x = (lambda)*x= 3: B*A*x = (lambda)*x
JOBZβ CHARACTER*1:= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors.
RANGERANGEβ okay bestie, this one is aCHARACTER*1and it chooses the eigenvalue hunt mode π'A': all eigenvalues will be found.'V': all eigenvalues in the half-open interval(VL,VU]will be found.'I': theIL-th throughIU-th eigenvalues will be found.
UPLOβ anotherCHARACTER*1, and it tells us which triangle is living in the arrays:'U': Upper triangle ofAandBare stored;'L': Lower triangle ofAandBare stored.
NβINTEGER, the order of the matrix pencil(A,B).N >= 0.No cap π«ΆAPβDOUBLE PRECISION array, dimension (N*(N+1)/2). On entry, this is the upper or lower triangle of the symmetric matrixA, packed columnwise in a linear array. Thej-th column ofAis stored inAPlike this:
if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
On exit, the contents of AP are destroyed. poof, gone π
BPβDOUBLE PRECISION array, dimension (N*(N+1)/2). On entry, this is the upper or lower triangle of the symmetric matrixB, packed columnwise in a linear array. Thej-th column ofBis stored inBPlike this:
if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
On exit, BP holds the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T, in the same storage format as B. iconic behavior β¨
VLβDOUBLE PRECISION. IfRANGE='V', this is the lower bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.VUβDOUBLE PRECISION. IfRANGE='V', this is the upper bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.ILβINTEGER. IfRANGE='I', this is the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.Not referenced ifRANGE = 'A'or'V'.IUβINTEGER. IfRANGE='I', this is the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0.Not referenced ifRANGE = 'A'or'V'.ABSTOLβDOUBLE PRECISION. This is the absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval[a,b]of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.
Eigenvalues will be computed most accurately when ABSTOL is set to twice the underflow threshold 2*DLAMCH('S'), not zero. If this routine returns with INFO>0, indicating that some eigenvectors did not converge, try setting ABSTOL to 2*DLAMCH('S'). bestie, this is the accuracy dial, don't skip it π
MβINTEGER. The total number of eigenvalues found.0 <= M <= N.IfRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1.WβDOUBLE PRECISION array, dimension (N). On normal exit, the firstMelements contain the selected eigenvalues in ascending order. literally the main characters πZβDOUBLE PRECISION array, dimension (LDZ, max(1,M)). IfJOBZ = 'N', thenZis not referenced. IfJOBZ = 'V', then ifINFO = 0, the firstMcolumns ofZcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with thei-th column ofZholding the eigenvector associated withW(i). The eigenvectors are normalized as follows:
if ITYPE = 1 or 2, Z**T*B*Z = I;
if ITYPE = 3, Z**T*inv(B)*Z = I.
If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL. Note: the user must ensure that at least max(1,M) columns are supplied in the array Z; if RANGE = 'V', the exact value of M is not known in advance and an upper bound must be used. no cap, plan ahead π§
LDZβINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V',LDZ >= max(1,N).WORKβDOUBLE PRECISION array, dimension (8*N).IWORKβINTEGER array, dimension (5*N).IFAILβINTEGER array, dimension (N). IfJOBZ = 'V', then ifINFO = 0, the firstMelements ofIFAILare zero. IfINFO > 0, thenIFAILcontains the indices of the eigenvectors that failed to converge. IfJOBZ = 'N', thenIFAILis not referenced.INFOβINTEGER. Here's the tea β= 0: successful exit< 0: ifINFO = -i, thei-th argument had an illegal value> 0:DPPTRForDSPEVXreturned an error code:<= N: ifINFO = i,DSPEVXfailed to converge;ieigenvectors failed to converge. Their indices are stored in arrayIFAIL.> N: ifINFO = N + i, for1 <= i <= N, then the leading principal minor of orderiofBis not positive. The factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed.
Author
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
Contributors
Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
Definition at line 269 of file dspgvx.f.
subroutine sspgvx (integer itype, character jobz, character range, character
uplo, integer n, real, dimension( * ) ap, real, dimension( * ) bp, real
vl, real vu, integer il, integer iu, real abstol, integer m, real,
dimension( * ) w, real, dimension( ldz, * ) z, integer ldz, real,
dimension( * ) work, integer, dimension( * ) iwork, integer, dimension(
* ) ifail, integer info)
SSPGVX
Purpose
SSPGVX computes selected eigenvalues, and optionally, eigenvectors of a real generalized symmetric-definite eigenproblem, of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and B are assumed to be symmetric, stored in packed storage, and B is also positive definite. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. we love a flexible icon π
Parameters
ITYPEβINTEGER. Specifies the problem type to be solved:= 1:A*x = (lambda)*B*x= 2:A*B*x = (lambda)*x= 3:B*A*x = (lambda)*x
JOBZβCHARACTER*1:'N': Compute eigenvalues only;'V': Compute eigenvalues and eigenvectors.
RANGEβCHARACTER*1:'A': all eigenvalues will be found.'V': all eigenvalues in the half-open interval(VL,VU]will be found.'I': theIL-th throughIU-th eigenvalues will be found.
UPLOβCHARACTER*1:'U': Upper triangle ofAandBare stored;'L': Lower triangle ofAandBare stored.
NβINTEGER. The order of the matrix pencil(A,B).N >= 0.APβREAL array, dimension (N*(N+1)/2). On entry, the upper or lower triangle of the symmetric matrixA, packed columnwise in a linear array. Thej-th column ofAis stored in the arrayAPas follows:
if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1<=i<=j;
if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
On exit, the contents of AP are destroyed. rip to AP π
BPβREAL array, dimension (N*(N+1)/2). On entry, the upper or lower triangle of the symmetric matrixB, packed columnwise in a linear array. Thej-th column ofBis stored in the arrayBPas follows:
if UPLO = 'U', BP(i + (j-1)*j/2) = B(i,j) for 1<=i<=j;
if UPLO = 'L', BP(i + (j-1)*(2*n-j)/2) = B(i,j) for j<=i<=n.
On exit, the triangular factor U or L from the Cholesky factorization B = U**T*U or B = L*L**T, in the same storage format as B.
VLβREAL. IfRANGE='V', the lower bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.VUβREAL. IfRANGE='V', the upper bound of the interval to be searched for eigenvalues.VL < VU. Not referenced ifRANGE = 'A'or'I'.ILβILβINTEGERenergy. Only relevant whenRANGE='I', and then it's the index of the smallest eigenvalue you want back. Constraint, no cap:1 <= IL <= IU <= N, ifN > 0; andIL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'β so don't stress about it then, bestie π«ΆIUβINTEGERtoo. IfRANGE='I', this is the index of the largest eigenvalue to be returned. Same rules, same energy:1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. And again β not referenced ifRANGE = 'A'or'V'β¨ABSTOLβ aREAL, and it's the absolute error tolerance for the eigenvalues. Here's the vibe check on convergence: an approximate eigenvalue gets accepted as converged when it's determined to lie in an interval[a,b]of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| is used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing A to tridiagonal form.
Okay so this is the part people always get wrong π Eigenvalues get computed most accurately whenABSTOLis set to twice the underflow threshold2*SLAMCH('S'), not zero. And if this routine comes back withINFO>0, meaning some eigenvectors did not converge β try settingABSTOLto2*SLAMCH('S'). That's the move π
MβINTEGER. The total number of eigenvalues found, and0 <= M <= N. IfRANGE = 'A', thenM = N; and ifRANGE = 'I', thenM = IU-IL+1. Easy math, slay πWβREALarray, dimension(N). On normal exit, the firstMelements contain the selected eigenvalues, in ascending order. Cute and sorted, we love to see it βZβREALarray, dimension(LDZ, max(1,M)). IfJOBZ = 'N', thenZis not referenced (it's just sitting there, minding its business π). IfJOBZ = 'V', then ifINFO = 0, the firstMcolumns ofZcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with the i-th column ofZholding the eigenvector associated withW(i).
The eigenvectors are normalized as follows: if ITYPE = 1 or 2, Z**T*B*Z = I; if ITYPE = 3, Z**T*inv(B)*Z = I.
And if an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL.
Important, bestie: the user must ensure that at leastmax(1,M)columns are supplied in the arrayZ. IfRANGE = 'V', the exact value ofMis not known in advance and an upper bound must be used. Plan ahead, don't get caught lacking π
LDZβINTEGER. The leading dimension of the arrayZ.LDZ >= 1, and ifJOBZ = 'V', thenLDZ >= max(1,N). Respect the dimension, it's giving main character energy πWORKβREALarray, dimension(8*N). That's your scratch space, go off π§IWORKβINTEGERarray, dimension(5*N). Integer scratch space, equally iconic β¨IFAILβINTEGERarray, dimension(N). IfJOBZ = 'V', then ifINFO = 0, the firstMelements ofIFAILare zero (clean, no failures, we love a peaceful life π). IfINFO > 0, thenIFAILcontains the indices of the eigenvectors that failed to converge β so you know exactly which ones ghosted you π. IfJOBZ = 'N', thenIFAILis not referenced.INFOβINTEGER, the moment of truth:= 0: successful exit π< 0: ifINFO = -i, the i-th argument had an illegal value (you passed something cursed, ngl)> 0:SPPTRForSSPEVXreturned an error code:<= N: ifINFO = i,SSPEVXfailed to converge;ieigenvectors failed to converge. Their indices are stored in arrayIFAIL.> N: ifINFO = N + i, for1 <= i <= N, then the leading principal minor of orderiofBis not positive. The factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed π So likeβ¦ the whole thing is a wash, start over.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Contributors:
Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
Definition at line 269 of file sspgvx.f.
π subroutine zhpgvx
subroutine zhpgvx (integer itype, character jobz, character range, character
uplo, integer n, complex*16, dimension( * ) ap, complex*16, dimension( *
) bp, double precision vl, double precision vu, integer il, integer iu,
double precision abstol, integer m, double precision, dimension( * ) w,
complex*16, dimension( ldz, * ) z, integer ldz, complex*16, dimension( *
) work, double precision, dimension( * ) rwork, integer, dimension( * )
iwork, integer, dimension( * ) ifail, integer info)
ZHPGVX πΈ
Purpose:
!>
!> ZHPGVX computes selected eigenvalues and, optionally, eigenvectors
!> of a complex generalized Hermitian-definite eigenproblem, of the form
!> A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and
!> B are assumed to be Hermitian, stored in packed format, and B is also
!> positive definite. Eigenvalues and eigenvectors can be selected by
!> specifying either a range of values or a range of indices for the
!> desired eigenvalues.
!>
Okay so to translate: ZHPGVX computes selected eigenvalues and, optionally, eigenvectors of a complex generalized Hermitian-definite eigenproblem, of the form A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and B are assumed to be Hermitian, stored in packed format, and B is also positive definite. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues. It's giving β¨custom orderβ¨ and honestly? obsessed π
β¨ Parameters β¨
ITYPEβINTEGER. Specifies the problem type to be solved:= 1:A*x = (lambda)*B*x= 2:A*B*x = (lambda)*x= 3:B*A*x = (lambda)*x
JOBZβCHARACTER*1.= 'N': Compute eigenvalues only;= 'V': Compute eigenvalues and eigenvectors. (the full package, periodt π )
RANGEβCHARACTER*1.= 'A': all eigenvalues will be found;= 'V': all eigenvalues in the half-open interval(VL,VU]will be found;= 'I': theIL-th throughIU-th eigenvalues will be found.
UPLOβCHARACTER*1.= 'U': Upper triangles ofAandBare stored;= 'L': Lower triangles ofAandBare stored.
NβINTEGER. The order of the matricesAandB.N >= 0.APβCOMPLEX*16array, dimension(N*(N+1)/2). On entry, the upper or lower triangle of the Hermitian matrixA, packed columnwise in a linear array. The j-th column ofAis stored in the arrayAPas follows:- if
UPLO = 'U',AP(i + (j-1)*j/2) = A(i,j)for1<=i<=j; - if
UPLO = 'L',AP(i + (j-1)*(2*n-j)/2) = A(i,j)forj<=i<=n.
- if
On exit, the contents of AP are destroyed π So don't come crying to me if you needed them later β it says what it says.
BPβCOMPLEX*16array, dimension(N*(N+1)/2). On entry, the upper or lower triangle of the Hermitian matrixB, packed columnwise in a linear array. The j-th column ofBis stored in the arrayBPas follows:- if
UPLO = 'U',BP(i + (j-1)*j/2) = B(i,j)for1<=i<=j; - if
UPLO = 'L',BP(i + (j-1)*(2*n-j)/2) = B(i,j)forj<=i<=n.
- if
On exit, the triangular factorUorLfrom the Cholesky factorizationB = U**H*UorB = L*L**H, in the same storage format asB. SoBPgets a glow-up, not a deletion β noted π¦
VLβDOUBLE PRECISION. IfRANGE='V', the lower bound of the interval to be searched for eigenvalues. Constraint:VL < VU. Not referenced ifRANGE = 'A'or'I'.VUβDOUBLE PRECISION. IfRANGE='V', the upper bound of the interval to be searched for eigenvalues. Constraint:VL < VU. Not referenced ifRANGE = 'A'or'I'.ILβINTEGER. IfRANGE='I', the index of the smallest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.IUβINTEGER. IfRANGE='I', the index of the largest eigenvalue to be returned.1 <= IL <= IU <= N, ifN > 0;IL = 1andIU = 0ifN = 0. Not referenced ifRANGE = 'A'or'V'.ABSTOLβDOUBLE PRECISION. The absolute error tolerance for the eigenvalues. An approximate eigenvalue is accepted as converged when it is determined to lie in an interval[a,b]of width less than or equal to
ABSTOL + EPS * max( |a|,|b| ) ,
where EPS is the machine precision. If ABSTOL is less than or equal to zero, then EPS*|T| will be used in its place, where |T| is the 1-norm of the tridiagonal matrix obtained by reducing AP to tridiagonal form.
Same warning as before because it matters, bestie: eigenvalues will be computed most accurately whenABSTOLis set to twice the underflow threshold2*DLAMCH('S'), not zero. If this routine returns withINFO>0, indicating that some eigenvectors did not converge, try settingABSTOLto2*DLAMCH('S'). That's the fix, iykyk π₯
MβINTEGER. The total number of eigenvalues found.0 <= M <= N. IfRANGE = 'A',M = N, and ifRANGE = 'I',M = IU-IL+1.WβDOUBLE PRECISIONarray, dimension(N). On normal exit, the firstMelements contain the selected eigenvalues in ascending order. Sorted, stunning, no notes πZβ
Z β okay so Z is a COMPLEX*16 array, dimension (LDZ, N). If JOBZ = 'N', then Z is literally not referenced β it's sitting this one out, no cap.
If JOBZ = 'V', then if INFO = 0, the first M columns of Z contain the orthonormal eigenvectors of the matrix A corresponding to the selected eigenvalues, with the i-th column of Z holding the eigenvector associated with W(i). The eigenvectors are normalized as follows:
- if
ITYPE = 1or2,Z**H*B*Z = I; - if
ITYPE = 3,Z**H*inv(B)*Z = I.
If an eigenvector fails to converge, then that column of Z contains the latest approximation to the eigenvector, and the index of the eigenvector is returned in IFAIL.
Note, bestie: the user must ensure that at leastmax(1,M)columns are supplied in the arrayZ; ifRANGE = 'V', the exact value ofMis not known in advance and an upper bound must be used. π«Ά
LDZ β LDZ is INTEGER. The leading dimension of the array Z. LDZ >= 1, and if JOBZ = 'V', LDZ >= max(1,N).
WORK β WORK is a COMPLEX*16 array, dimension (2*N).
RWORK β RWORK is a DOUBLE PRECISION array, dimension (7*N).
IWORK β IWORK is an INTEGER array, dimension (5*N).
IFAIL β IFAIL is an INTEGER array, dimension (N). If JOBZ = 'V', then if INFO = 0, the first M elements of IFAIL are zero. If INFO > 0, then IFAIL contains the indices of the eigenvectors that failed to converge. If JOBZ = 'N', then IFAIL is not referenced.
INFO β INFO is INTEGER.
= 0: successful exit< 0: ifINFO = -i, the i-th argument had an illegal value> 0:ZPPTRForZHPEVXreturned an error code:<= N: ifINFO = i,ZHPEVXfailed to converge; i eigenvectors failed to converge. Their indices are stored in arrayIFAIL.> N: ifINFO = N + i, for1 <= i <= n, then the leading principal minor of order i ofBis not positive. The factorization ofBcould not be completed and no eigenvalues or eigenvectors were computed.
π AUTHOR π
- Univ. of Tennessee
- Univ. of California Berkeley
- Univ. of Colorado Denver
- NAG Ltd.
πΈ Contributors πΈ
- Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
Definition at line 274 of file zhpgvx.f.
π¦ AUTHOR π¦
Generated automatically by Doxygen for LAPACK from the source code.
And that's the whole page, bestie! Footer source/version: LAPACK, Version 3.12.0; page tag: hpgvx(3); date: not listed in the footer, so I'm not making one up. Big sparkle energy πβ¨
π¦ 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