Developer Reference

  • 2021.1
  • 12/04/2020
  • Public Content
Contents

?stevd

Computes all eigenvalues and, optionally, all eigenvectors of a real symmetric tridiagonal matrix using divide and conquer algorithm.

Syntax

lapack_int
LAPACKE_sstevd
(
int
matrix_layout
,
char
jobz
,
lapack_int
n
,
float
*
d
,
float
*
e
,
float
*
z
,
lapack_int
ldz
);
lapack_int
LAPACKE_dstevd
(
int
matrix_layout
,
char
jobz
,
lapack_int
n
,
double
*
d
,
double
*
e
,
double
*
z
,
lapack_int
ldz
);
Include Files
  • mkl.h
Description
The routine computes all the eigenvalues, and optionally all the eigenvectors, of a real symmetric tridiagonal matrix
T
. In other words, the routine can compute the spectral factorization of
T
as:
T
=
Z
*
Λ
*
Z
T
.
Here
Λ
is a diagonal matrix whose diagonal elements are the eigenvalues
λ
i
, and
Z
is the orthogonal matrix whose columns are the eigenvectors
z
i
. Thus,
T
*
z
i
=
λ
i
*
z
i
for
i
= 1, 2, ...,
n
.
If the eigenvectors are requested, then this routine uses a divide and conquer algorithm to compute eigenvalues and eigenvectors. However, if only eigenvalues are required, then it uses the Pal-Walker-Kahan variant of the
QL
or
QR
algorithm.
There is no complex analogue of this routine.
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
jobz
=
'N'
, then only eigenvalues are computed.
If
jobz
=
'V'
, then eigenvalues and eigenvectors are computed.
n
The order of the matrix
T
(
n
0
).
d
,
e
Arrays:
d
contains the
n
diagonal elements of the tridiagonal matrix
T
.
The dimension of
d
must be at least max(1,
n
).
e
contains the
n
-1 off-diagonal elements of
T
.
The dimension of
e
must be at least max(1,
n
). The
n-
th element of this array is used as workspace.
ldz
The leading dimension of the output array
z
. Constraints:
ldz
1
if
job
=
'N'
;
ldz
max(1,
n
)
if
job
=
'V'
.
Output Parameters
d
On exit, if
info
= 0
, contains the eigenvalues of the matrix
T
in ascending order.
See also
info
.
z
Array, size
max(1,
ldz
*
n
) if
jobz
=
'V'
and 1 if
jobz
=
'N'
.
If
jobz
=
'V'
, then this array is overwritten by the orthogonal matrix
Z
which contains the eigenvectors of
T
.
If
jobz
=
'N'
, then
z
is not referenced.
e
On exit, this array is overwritten with intermediate results.
Return Values
This function returns a value
info
.
If
info
=0
, the execution is successful.
If
info
=
i
, then the algorithm failed to converge;
i
indicates the number of elements of an intermediate tridiagonal form which did not converge to zero.
If
info
=
-i
, the
i
-th parameter had an illegal value.
Application Notes
The computed eigenvalues and eigenvectors are exact for a matrix
T
+
E
such that
||
E
||
2
=
O
(
ε
)*||
T
||
2
, where
ε
is the machine precision.
If
λ
i
is an exact eigenvalue, and
μ
i
is the corresponding computed value, then
|
μ
i
-
λ
i
|
c
(
n
)*
ε
*||
T
||
2
where
c
(
n
)
is a modestly increasing function of
n
.
If
z
i
is the corresponding exact eigenvector, and
w
i
is the corresponding computed vector, then the angle
θ
(
z
i
,
w
i
)
between them is bounded as follows:
θ
(
z
i
,
w
i
)
c
(
n
)*
ε
*||
T
||
2
/ min
i
j
|
λ
i
-
λ
j
|
.
Thus the accuracy of a computed eigenvector depends on the gap between its eigenvalue and all the other eigenvalues.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.