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

◆ Zstemr()

Sub Zstemr ( Jobz As  String,
Range As  String,
N As  Long,
D() As  Double,
E() As  Double,
Vl As  Double,
Vu As  Double,
Il As  Long,
Iu As  Long,
M As  Long,
W() As  Double,
Z() As  Complex,
Nzc As  Long,
Isuppz() As  Long,
Tryrac As  Boolean,
Info As  Long 
)

Eigenvalues and eigenvectors of a symmetric tridiagonal matrix to which a Hermitian matrix was reduced (MRRR method)

Purpose
This routine computes selected eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix T to which a Hermitian matrix was reduced. Any such unreduced matrix has a well defined set of pairwise different real eigenvalues, the corresponding real eigenvectors are pairwise orthogonal.
The spectrum may be computed either completely or partially by specifying either an interval (Vl, Vu] or a Range of indices Il〜Iu for the desired eigenvalues.
Depending on the number of desired eigenvalues, these are computed either by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are computed by the use of various suitable LDL^T factorizations near clusters of close eigenvalues (referred to as RRRs, Relatively Robust Representations).
While the eigenvectors of the real symmetric tridiagonal matrix are real, the eigenvectors of original complex Hermitean matrix have complex entries in general. Since LAPACK drivers overwrite the matrix data with the eigenvectors, this routine accepts complex workspace to facilitate interoperability with Zunmtr or Zupmtr.
Parameters
[in]Jobz= "N": Compute eigenvalues only.
= "V": Compute eigenvalues and eigenvectors.
[in]Range= "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.
[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] D() is overwritten.
[in,out]E()Array E(LE - 1) (LE >= N)
[in] The (N-1) subdiagonal elements of the tridiagonal matrix T in elements 0 to N - 2 of E(). E(N - 1) need not be set on input, but is used internally as workspace.
[out] E() is overwritten.
[in]VlRange = "V": The lower bound of the interval to be searched for eigenvalues. (Vl < Vu)
Range = "A" or "I": Not referenced.
[in]VuRange = "V": The upper bound of the interval to be searched for eigenvalues. (Vl < Vu)
Range = "A" or "I": Not referenced.
[in]IlRange = "I": The index of the smallest eigenvalue to be returned. (1 <= Il <= Iu <= N, if N > 0)
Range = "A" or "V": Not referenced.
[in]IuRange = "I": The index of the largest eigenvalues to be returned. (1 <= Il <= Iu <= N, if N > 0)
Range = "A" or "V": Not referenced.
[out]MThe total number of eigenvalues found. (0 <= M <= N)
If Range = "A", M = N, and if Range = "I", M = Iu - Il + 1.
[out]W()Array W(LW - 1) (LW >= N)
The first M elements contain the selected eigenvalues in ascending order.
[out]Z()Array Z(LZ1 - 1, LZ2 - 1) (LZ1 >= N, LZ2 >= M)
Jobz = "V": If Info = 0, the first M columns of Z() contain the orthonormal eigenvectors of the matrix T corresponding to the selected eigenvalues, with the i-th column of Z() holding the eigenvector associated with W(i).
Jobz = "N": Z() is not referenced.
Note: The user must ensure that at least M columns are supplied in the array Z(); if Range = "V", the exact value of M is not known in advance and can be computed with a workspace query by setting Nzc = -1, see below.
[in]NzcThe number of eigenvectors to be held in the array Z().
Range = "A": Nzc >= max(1, N).
Range = "V": Nzc >= the number of eigenvalues in (Vl, Vu].
Range = "I": Nzc >= Iu - Il + 1.
If Nzc = -1, then a workspace query is assumed. The routine calculates the number of columns of the array Z() that are needed to hold the eigenvectors. This value is returned in Z(0, 0).
[out]Isuppz()Array Isuppz(LIsuppz - 1) (LIsuppz >= 2*max(1, M))
The support of the eigenvectors in Z(), i.e., the indices indicating the nonzero elements in Z(). The i-th computed eigenvector is nonzero only in elements Isuppz(2*(i-1)) through Isuppz(2*(i-1) + 1). This is relevant in the case when the matrix is split. Isuppz() is only accessed when Jobz is "V" and N > 0.
[in,out]Tryrac[in]
= True: Indicates that the code should check whether the tridiagonal matrix defines its eigenvalues to high relative accuracy. If so, the code uses relative-accuracy preserving algorithms that might be (a bit) slower depending on the matrix. If the matrix does not define its eigenvalues to high relative accuracy, the code can uses possibly faster algorithms.
= False: The code is not required to guarantee relatively accurate eigenvalues and can use the fastest possible techniques.
[out] True if the matrix defines its eigenvalues to high relative accuracy. False otherwise.
[out]Info= 0: Successful exit.
= -1: The argument Jobz had an illegal value. (Jobz <> "N" nor "V")
= -2: The argument Range had an illegal value. (Range <> "A", "V" nor "I")
= -3: The argument N had an illegal value. (N < 0)
= -4: The argument D() is invalid.
= -5: The argument E() is invalid.
= -7: The argument Vu had an illegal value. (Vu <= Vl)
= -8: The argument Il had an illegal value. (Il < 1 or Il > N)
= -9: The argument Iu had an illegal value. (Iu < min(N, Il) or Iu > N)
= -11: The argument W() is invalid.
= -12: The argument Z() is invalid.
= -13: The argument Nzc had an illegal value. (Nzc too small)
= -14: The argument Isuppz() is invalid.
= i > 0: If Info = 1x, internal error in Dlarre. If Info = 2x, internal error in Dlarrv.
Reference
LAPACK