?stevx
?stevx
Computes selected eigenvalues and eigenvectors of a real symmetric tridiagonal matrix.
Syntax
lapack_int
LAPACKE_sstevx
(
int
matrix_layout
,
char
jobz
,
char
range
,
lapack_int
n
,
float
*
d
,
float
*
e
,
float
vl
,
float
vu
,
lapack_int
il
,
lapack_int
iu
,
float
abstol
,
lapack_int
*
m
,
float
*
w
,
float
*
z
,
lapack_int
ldz
,
lapack_int
*
ifail
);
lapack_int
LAPACKE_dstevx
(
int
matrix_layout
,
char
jobz
,
char
range
,
lapack_int
n
,
double
*
d
,
double
*
e
,
double
vl
,
double
vu
,
lapack_int
il
,
lapack_int
iu
,
double
abstol
,
lapack_int
*
m
,
double
*
w
,
double
*
z
,
lapack_int
ldz
,
lapack_int
*
ifail
);
Include Files
- mkl.h
Description
The routine computes selected eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix
A
. Eigenvalues and eigenvectors can be selected by specifying either a range of values or a range of indices for the desired eigenvalues.Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- jobz
- Must be'N'or'V'.If, then only eigenvalues are computed.job='N'If, then eigenvalues and eigenvectors are computed.job='V'
- range
- Must be'A'or'V'or'I'.If, the routine computes all eigenvalues.range='A'If, the routine computes eigenvaluesrange='V'in the half-open interval:w[i]vl<w[i].≤vuIf, the routine computes eigenvalues with indicesrange='I'iltoiu.
- n
- The order of the matrixA().n≥0
- d,e
- Arrays:contains thedndiagonal elements of the tridiagonal matrixA.The dimension ofdmust be at least max(1,n).contains theen-1 subdiagonal elements ofA.The dimension ofemust be at least max(1,n-1). Then-th element of this array is used as workspace.
- vl,vu
- If, the lower and upper bounds of the interval to be searched for eigenvalues.range='V'Constraint:.vl<vuIforrange='A''I',vlandvuare not referenced.
- il,iu
- If, the indices in ascending order of the smallest and largest eigenvalues to be returned.range='I'Constraint:1, if≤il≤iu≤n;n> 0andil=1ifiu=0.n= 0Iforrange='A''V',ilandiuare not referenced.
- abstol
- ldz
- The leading dimensions of the output arrayz;. Ifldz≥1, thenjobz='V'(1,ldz≥maxn)for column major layout and.ldz≥max(1,m) for row major layout
Output Parameters
- m
- The total number of eigenvalues found,0.≤m≤nIf,range='A', ifm=n,range='I', and ifm=iu-il+1the exact value ofrange='V'mis unknown.
- w,z
- Arrays:, size at least max(1,wn).The firstmelements ofwcontain the selected eigenvalues of the matrixAin ascending order.
- z(size at least max(1,.ldz*m) for column major layout and max(1,ldz*n) for row major layout)If, then ifjobz='V', the firstinfo= 0mcolumns ofzcontain the orthonormal eigenvectors of the matrixAcorresponding to the selected eigenvalues, with thei-th column ofzholding the eigenvector associated with.w[i- 1]If an eigenvector fails to converge, then that column ofzcontains the latest approximation to the eigenvector, and the index of the eigenvector is returned inifail.If, thenjobz='N'zis not referenced.
- d,e
- On exit, these arrays may be multiplied by a constant factor chosen to avoid overflow or underflow in computing the eigenvalues.
- ifail
- Array, size at least max(1,n).If, then ifjobz='V', the firstinfo= 0melements ofifailare zero; if, theinfo> 0ifailcontains the indices of the eigenvectors that failed to converge.If, thenjobz='N'ifailis not referenced.
Return Values
This function returns a value
info
.If , the execution is successful.
info
=0If , the
info
= -i
i
-th parameter had an illegal value.If , then
info
= i
i
eigenvectors failed to converge; their indices are stored in the array ifail
.Application Notes
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 , where
abstol
+ε
*max(|a|,|b|)ε
is the machine precision. If is used instead. Eigenvalues are computed most accurately when
abstol
is less than or equal to zero, then ε
*|A
|1
abstol
is set to twice the underflow threshold 2*?lamch
('S'), not zero. If this routine returns with , indicating that some eigenvectors did not converge, set
info
> 0abstol
to 2*?lamch
('S').