Developer Reference

Contents

?steqr

Computes all eigenvalues and eigenvectors of a symmetric or Hermitian matrix reduced to tridiagonal form (QR algorithm).

Syntax

lapack_int LAPACKE_ssteqr
(
int
matrix_layout
,
char
compz
,
lapack_int
n
,
float*
d
,
float*
e
,
float*
z
,
lapack_int
ldz
);
lapack_int LAPACKE_dsteqr
(
int
matrix_layout
,
char
compz
,
lapack_int
n
,
double*
d
,
double*
e
,
double*
z
,
lapack_int
ldz
);
lapack_int LAPACKE_csteqr
(
int
matrix_layout
,
char
compz
,
lapack_int
n
,
float*
d
,
float*
e
,
lapack_complex_float*
z
,
lapack_int
ldz
);
lapack_int LAPACKE_zsteqr
(
int
matrix_layout
,
char
compz
,
lapack_int
n
,
double*
d
,
double*
e
,
lapack_complex_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:
T
=
Z
*
Λ
*
Z
T
. Here
Λ
is a diagonal matrix whose diagonal elements are the eigenvalues
λ
i
;
Z
is an orthogonal matrix whose columns are eigenvectors. Thus,
T
*
z
i
=
λ
i
*
z
i
for
i
= 1, 2, ...,
n
.
The routine normalizes the eigenvectors so that
||z
i
||
2
= 1
.
You can also use the routine for computing the eigenvalues and eigenvectors of an arbitrary real symmetric (or complex Hermitian) matrix
A
reduced to tridiagonal form
T
:
A
=
Q*T*Q
H
. In this case, the spectral factorization is as follows:
A
=
Q*T*Q
H
= (
Q*Z
)*
Λ
*(
Q*Z
)
H
. Before calling
?steqr
, you must reduce
A
to tridiagonal form and generate the explicit matrix
Q
by calling the following routines:
 
for real matrices:
for complex matrices:
full storage
?sytrd
,
?orgtr
?hetrd
,
?ungtr
packed storage
?sptrd
,
?opgtr
?hptrd
,
?upgtr
band storage
?sbtrd
(vect
=
'V'
)
?hbtrd
(vect
=
'V'
)
If you need eigenvalues only, it
'
s more efficient to call sterf. If
T
is positive-definite, pteqr can compute small eigenvalues more accurately than
?steqr
.
To solve the problem by a single call, use one of the divide and conquer routines stevd, syevd, spevd, or sbevd for real symmetric matrices or heevd, hpevd, or hbevd for complex Hermitian matrices.
Input Parameters
matrix_layout
Specifies whether matrix storage layout is row major (
LAPACK_ROW_MAJOR
) or column major (
LAPACK_COL_MAJOR
).
compz
Must be
'N'
or
'I'
or
'V'
.
If
compz
=
'N'
, the routine computes eigenvalues only.
If
compz
=
'I'
, the routine computes the eigenvalues and eigenvectors of the tridiagonal matrix
T
.
If
compz
=
'V'
, the routine computes the eigenvalues and eigenvectors of the original symmetric matrix. On entry,
z
must contain the orthogonal matrix used to reduce the original matrix to tridiagonal form.
n
The order of the matrix
T
(
n
0
).
d
,
e
Arrays:
d
contains the diagonal elements of
T
.
The size of
d
must be at least max(1,
n
).
e
contains the off-diagonal elements of
T
.
The size of
e
must be at least max(1,
n
-1).
z
Array, size
max(1,
ldz
*
n
)
.
If
compz
=
'N'
or
'I'
,
z
need not be set.
If
vect
=
'V'
,
z
must contain the orthogonal matrix used in the reduction to tridiagonal form.
ldz
The leading dimension of
z
. Constraints:
ldz
1
if
compz
=
'N'
;
ldz
max(1,
n
)
if
compz
=
'V'
or
'I'
.
Output Parameters
d
The
n
eigenvalues in ascending order, unless
info
> 0.
See also
info
.
e
On exit, the array is overwritten; see
info
.
z
If
info
= 0
, contains the
n
-by-
n
matrix the columns of which are orthonormal eigenvectors (the
i
-th column corresponds to the
i
-th eigenvalue).
Return Values
This function returns a value
info
.
If
info
=0
, the execution is successful.
If
info
=
i
, the algorithm failed to find all the eigenvalues after 30
n
iterations:
i
off-diagonal elements have not converged to zero. On exit,
d
and
e
contain, respectively, the diagonal and off-diagonal elements of a tridiagonal matrix orthogonally similar to
T
.
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
|
.
The total number of floating-point operations depends on how rapidly the algorithm converges. Typically, it is about
24
n
2
if
compz
=
'N'
;
7
n
3
(for complex flavors,
14
n
3
) if
compz
=
'V'
or
'I'
.

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804