XLPack 6.1
Excel VBA Numerical Library Reference Manual
Loading...
Searching...
No Matches

◆ Zpteqr()

Sub Zpteqr ( Compz As  String,
N As  Long,
D() As  Double,
E() As  Double,
Z() As  Complex,
Info As  Long 
)

Eigenvalues and eigenvectors of symmetric positive definite tridiagonal matrix to which a Hermitian matrix was reduced

Purpose
This routine computes all eigenvalues and, optionally, eigenvectors of a symmetric positive definite tridiagonal matrix by first factoring the matrix using Dpttrf and then calling Zbdsqr to compute the singular values of the bidiagonal factor.

This routine computes the eigenvalues of the positive definite tridiagonal matrix to high relative accuracy. This means that if the eigenvalues range over many orders of magnitude in size, then the small eigenvalues and corresponding eigenvectors will be computed more accurately than, for example, with the standard QR method.

The eigenvectors of a full or band positive definite Hermitian matrix can also be found if Zhetrd or Zhptrd or Zhbtrd has been used to reduce this matrix to tridiagonal form. (The reduction to tridiagonal form, however, may preclude the possibility of obtaining high relative accuracy in the small eigenvalues of the original matrix, if these eigenvalues range over many orders of magnitude.)
Parameters
[in]Compz= "N": Compute eigenvalues only.
= "V": Compute eigenvalues and eigenvectors of the original Hermitian matrix. On entry, Z()contains the unitary matrix used to reduce the original matrix to tridiagonal form.
= "I": Compute eigenvalues and eigenvectors of the tridiagonal matrix.
[in]NOrder of the matrix. (N >= 0) (If N = 0, returns without computation)
[in,out]D()Array D(LD - 1) (LD >= N)
[in] The diagonal elements of the tridiagonal matrix.
[out] The eigenvalues in descending order.
[in,out]E()Array E(LE - 1) (LE >= N - 1)
[in] The (N - 1) subdiagonal elements of the tridiagonal matrix.
[out] E() has been destroyed.
[in,out]Z()Array Z(LZ1 - 1, LZ2 - 1) (LZ1 >= N, LZ2 >= N)
[in] If Compz = "V", the unitary matrix used in the reduction to tridiagonal form.
[out] If Compz = "V", the orthonormal eigenvectors of the original Hermitian matrix.
If Compz = "I", the orthonormal eigenvectors of the tridiagonal matrix.
If info > 0 on exit, Z() contains the eigenvectors associated with only the stored eigenvalues.
If Compz = "N", then Z() is not referenced.
[out]Info= 0: Successful exit.
= -1: The argument Compz had an illegal value. (Compz <> "N", "V" nor "I")
= -2: The argument N had an illegal value. (N < 0)
= -3: The argument D() is invalid.
= -4: The argument E() is invalid.
= -5: The argument Z() is invalid.
= i > 0:
If i <= N, the Cholesky factorization of the matrix could not be performed because the i-th principal minor was not positive definite.
If i > N, the SVD algorithm failed to converge. i - N off-diagonal elements of the bidiagonal factor did not converge to zero.
Reference
LAPACK