stevr#
Functions
-
void sstevr(const char *jobz, const char *range, const INT n, f32 *D, f32 *E, const f32 vl, const f32 vu, const INT il, const INT iu, const f32 abstol, INT *m, f32 *W, f32 *Z, const INT ldz, INT *isuppz, f32 *work, const INT lwork, INT *iwork, const INT liwork, INT *info)#
SSTEVR computes selected eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix T.
Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.
Whenever possible, SSTEVR calls SSTEMR to compute the eigenspectrum using Relatively Robust Representations. SSTEMR computes eigenvalues by the dqds algorithm, while orthogonal eigenvectors are computed from various “good” L D L^T representations (also known as Relatively Robust Representations). Gram-Schmidt orthogonalization is avoided as far as possible. More specifically, the various steps of the algorithm are as follows. For the i-th unreduced block of T, (a) Compute T - sigma_i = L_i D_i L_i^T, such that L_i D_i L_i^T is a relatively robust representation, (b) Compute the eigenvalues, lambda_j, of L_i D_i L_i^T to high relative accuracy by the dqds algorithm, (c) If there is a cluster of close eigenvalues, “choose” sigma_i close to the cluster, and go to step (a), (d) Given the approximate eigenvalue lambda_j of L_i D_i L_i^T, compute the corresponding eigenvector by forming a rank-revealing twisted factorization. The desired accuracy of the output can be specified by the input parameter ABSTOL.
For more details, see “A new O(n^2) algorithm for the symmetric
tridiagonal eigenvalue/eigenvector problem”, by Inderjit Dhillon, Computer Science Division Technical Report No. UCB//CSD-97-971, UC Berkeley, May 1997.
Note 1 : SSTEVR calls SSTEMR when the full spectrum is requested on machines which conform to the ieee-754 floating point standard. SSTEVR calls SSTEBZ and SSTEIN on non-ieee machines and when partial spectrum requests are made.
Normal execution of SSTEMR may create NaNs and infinities and hence may abort due to a floating point exception in environments which do not handle NaNs and infinities in the ieee standard default manner.
Parameters
injobz= ‘N’: Compute eigenvalues only; = ‘V’: Compute eigenvalues and eigenvectors.
inrange= ‘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 (0-based indices).
innThe order of the matrix. n >= 0.
inoutDDouble precision array, dimension (n). On entry, the n diagonal elements of the tridiagonal matrix. On exit, D may be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues.
inoutEDouble precision array, dimension (max(1,n-1)). On entry, the (n-1) subdiagonal elements of the tridiagonal matrix in elements 0 to n-2. On exit, E may be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues.
invlIf range=’V’, the lower bound of the interval to be searched for eigenvalues. vl < vu. Not referenced if range = ‘A’ or ‘I’.
invuIf range=’V’, the upper bound of the interval to be searched for eigenvalues. vl < vu. Not referenced if range = ‘A’ or ‘I’.
inilIf range=’I’, the index of the smallest eigenvalue to be returned (0-based). 0 <= il <= iu < n, if n > 0. Not referenced if range = ‘A’ or ‘V’.
iniuIf range=’I’, the index of the largest eigenvalue to be returned (0-based). 0 <= il <= iu < n, if n > 0. Not referenced if range = ‘A’ or ‘V’.
inabstolThe 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.
outmThe total number of eigenvalues found. 0 <= m <= n. If range = ‘A’, m = n, and if range = ‘I’, m = iu-il+1.
outWDouble precision array, dimension (n). The first m elements contain the selected eigenvalues in ascending order.
outZDouble precision array, dimension (ldz, max(1,m)). If jobz = ‘V’, then if info = 0, the first m columns of Z contain the orthonormal eigenvectors of the matrix corresponding to the selected eigenvalues.
inldzThe leading dimension of the array Z. ldz >= 1, and if jobz = ‘V’, ldz >= max(1,n).
outisuppzInteger array, dimension (2*max(1,m)). The support of the eigenvectors in Z, i.e., the indices indicating the nonzero elements in Z (0-based).
outworkDouble precision array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.
inlworkThe dimension of the array work. lwork >= max(1,20*n). If lwork = -1, then a workspace query is assumed.
outiworkInteger array, dimension (max(1,liwork)). On exit, if info = 0, iwork[0] returns the optimal liwork.
inliworkThe dimension of the array iwork. liwork >= max(1,10*n). If liwork = -1, then a workspace query is assumed.
outinfo= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: Internal error
void sstevr(
const char* jobz,
const char* range,
const INT n,
f32* D,
f32* E,
const f32 vl,
const f32 vu,
const INT il,
const INT iu,
const f32 abstol,
INT* m,
f32* W,
f32* Z,
const INT ldz,
INT* isuppz,
f32* work,
const INT lwork,
INT* iwork,
const INT liwork,
INT* info
);
Functions
-
void dstevr(const char *jobz, const char *range, const INT n, f64 *D, f64 *E, const f64 vl, const f64 vu, const INT il, const INT iu, const f64 abstol, INT *m, f64 *W, f64 *Z, const INT ldz, INT *isuppz, f64 *work, const INT lwork, INT *iwork, const INT liwork, INT *info)#
DSTEVR computes selected eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix T.
Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.
Whenever possible, DSTEVR calls DSTEMR to compute the eigenspectrum using Relatively Robust Representations. DSTEMR computes eigenvalues by the dqds algorithm, while orthogonal eigenvectors are computed from various “good” L D L^T representations (also known as Relatively Robust Representations). Gram-Schmidt orthogonalization is avoided as far as possible. More specifically, the various steps of the algorithm are as follows. For the i-th unreduced block of T, (a) Compute T - sigma_i = L_i D_i L_i^T, such that L_i D_i L_i^T is a relatively robust representation, (b) Compute the eigenvalues, lambda_j, of L_i D_i L_i^T to high relative accuracy by the dqds algorithm, (c) If there is a cluster of close eigenvalues, “choose” sigma_i close to the cluster, and go to step (a), (d) Given the approximate eigenvalue lambda_j of L_i D_i L_i^T, compute the corresponding eigenvector by forming a rank-revealing twisted factorization. The desired accuracy of the output can be specified by the input parameter ABSTOL.
For more details, see “A new O(n^2) algorithm for the symmetric
tridiagonal eigenvalue/eigenvector problem”, by Inderjit Dhillon, Computer Science Division Technical Report No. UCB//CSD-97-971, UC Berkeley, May 1997.
Note 1 : DSTEVR calls DSTEMR when the full spectrum is requested on machines which conform to the ieee-754 floating point standard. DSTEVR calls DSTEBZ and DSTEIN on non-ieee machines and when partial spectrum requests are made.
Normal execution of DSTEMR may create NaNs and infinities and hence may abort due to a floating point exception in environments which do not handle NaNs and infinities in the ieee standard default manner.
Parameters
injobz= ‘N’: Compute eigenvalues only; = ‘V’: Compute eigenvalues and eigenvectors.
inrange= ‘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 (0-based indices).
innThe order of the matrix. n >= 0.
inoutDDouble precision array, dimension (n). On entry, the n diagonal elements of the tridiagonal matrix. On exit, D may be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues.
inoutEDouble precision array, dimension (max(1,n-1)). On entry, the (n-1) subdiagonal elements of the tridiagonal matrix in elements 0 to n-2. On exit, E may be multiplied by a constant factor chosen to avoid over/underflow in computing the eigenvalues.
invlIf range=’V’, the lower bound of the interval to be searched for eigenvalues. vl < vu. Not referenced if range = ‘A’ or ‘I’.
invuIf range=’V’, the upper bound of the interval to be searched for eigenvalues. vl < vu. Not referenced if range = ‘A’ or ‘I’.
inilIf range=’I’, the index of the smallest eigenvalue to be returned (0-based). 0 <= il <= iu < n, if n > 0. Not referenced if range = ‘A’ or ‘V’.
iniuIf range=’I’, the index of the largest eigenvalue to be returned (0-based). 0 <= il <= iu < n, if n > 0. Not referenced if range = ‘A’ or ‘V’.
inabstolThe 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.
outmThe total number of eigenvalues found. 0 <= m <= n. If range = ‘A’, m = n, and if range = ‘I’, m = iu-il+1.
outWDouble precision array, dimension (n). The first m elements contain the selected eigenvalues in ascending order.
outZDouble precision array, dimension (ldz, max(1,m)). If jobz = ‘V’, then if info = 0, the first m columns of Z contain the orthonormal eigenvectors of the matrix corresponding to the selected eigenvalues.
inldzThe leading dimension of the array Z. ldz >= 1, and if jobz = ‘V’, ldz >= max(1,n).
outisuppzInteger array, dimension (2*max(1,m)). The support of the eigenvectors in Z, i.e., the indices indicating the nonzero elements in Z (0-based).
outworkDouble precision array, dimension (max(1,lwork)). On exit, if info = 0, work[0] returns the optimal lwork.
inlworkThe dimension of the array work. lwork >= max(1,20*n). If lwork = -1, then a workspace query is assumed.
outiworkInteger array, dimension (max(1,liwork)). On exit, if info = 0, iwork[0] returns the optimal liwork.
inliworkThe dimension of the array iwork. liwork >= max(1,10*n). If liwork = -1, then a workspace query is assumed.
outinfo= 0: successful exit
< 0: if info = -i, the i-th argument had an illegal value
> 0: Internal error
void dstevr(
const char* jobz,
const char* range,
const INT n,
f64* D,
f64* E,
const f64 vl,
const f64 vu,
const INT il,
const INT iu,
const f64 abstol,
INT* m,
f64* W,
f64* Z,
const INT ldz,
INT* isuppz,
f64* work,
const INT lwork,
INT* iwork,
const INT liwork,
INT* info
);