Contents

# ?stemr

Computes selected eigenvalues and eigenvectors of a real symmetric tridiagonal matrix.

## Syntax

Include Files
• mkl.h
Description
The routine computes selected eigenvalues and, optionally, eigenvectors of a real symmetric tridiagonal matrix
T
. 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
L*D*L
T
factorizations near clusters of close eigenvalues (referred to as RRRs, Relatively Robust Representations). An informal sketch of the algorithm follows.
For each unreduced block (submatrix) of
T
,
1. Compute
T
- sigma*
I
=
L
*
D
*
L
T
, so that
L
and
D
define all the wanted eigenvalues to high relative accuracy. This means that small relative changes in the entries of
L
and
D
cause only small relative changes in the eigenvalues and eigenvectors. The standard (unfactored) representation of the tridiagonal matrix
T
does not have this property in general.
2. Compute the eigenvalues to suitable accuracy. If the eigenvectors are desired, the algorithm attains full accuracy of the computed eigenvalues only right before the corresponding vectors have to be computed, see steps c and d.
3. For each cluster of close eigenvalues, select a new shift close to the cluster, find a new factorization, and refine the shifted eigenvalues to suitable accuracy.
4. For each eigenvalue with a large enough relative separation compute the corresponding eigenvector by forming a rank revealing twisted factorization. Go back to step c for any clusters that remain.
Normal execution of
?stemr
may create NaNs and infinities and may abort due to a floating point exception in environments that do not handle NaNs and infinities in the IEEE standard default manner.
For more details, see: [Dhillon04], [Dhillon04-02], [Dhillon97]
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.
range
Must be
'A'
or
'V'
or
'I'
.
If
range
=
'A'
, the routine computes all eigenvalues.
If
range
=
'V'
, the routine computes all eigenvalues in the half-open interval:
(
vl
,
vu
]
.
If
range
=
'I'
, the routine computes eigenvalues with indices
il
to
iu
.
n
The order of the matrix
T
(
n
0
).
d
Array,
size
n
.
Contains
n
diagonal elements of the tridiagonal matrix
T
.
e
Array, size
n
.
Contains
(
n
-1)
off-diagonal 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.
vl
,
vu
If
range
=
'V'
, the lower and upper bounds of the interval to be searched for eigenvalues. Constraint:
vl
<
vu
.
If
range
=
'A'
or
'I'
,
vl
and
vu
are not referenced.
il
,
iu
If
range
=
'I'
, the indices in ascending order of the smallest and largest eigenvalues to be returned.
Constraint:
1
il
iu
n
, if
n
>0
.
If
range
=
'A'
or
'V'
,
il
and
iu
are not referenced.
ldz
The leading dimension of the output array
z
.
if
jobz
=
'V'
, then
ldz
≥ max(1,
n
)
for column major layout and
ldz
max(1,
m
) for row major layout
;
ldz
≥ 1
otherwise.
nzc
The number of eigenvectors to be held in the array
z
.
If
range
=
'A'
, then
nzc
≥max(1,
n
)
;
If
range
=
'V'
, then
nzc
is greater than or equal to the number of eigenvalues in the half-open interval:
(
vl
,
vu
]
.
If
range
=
'I'
, then
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 as the first entry of the array
z
, and no error message related to
nzc
is issued by the routine
xerbla
.
tryrac
If
tryrac
is true, it 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.
If
tryrac
is not true, the code is not required to guarantee relatively accurate eigenvalues and can use the fastest possible techniques.
Output Parameters
d
On exit, the array
d
is overwritten.
e
On exit, the array
e
is overwritten.
m
The total number of eigenvalues found,
0
m
n
.
If
range
=
'A'
, then
m
=
n
, and if
range
=
'I'
, then
m
=
iu
-
il
+1
.
w
Array,
size
n
.
The first
m
elements contain the selected eigenvalues in ascending order.
z
Array
z
(size max(1,
ldz
*
m
) for column major layout and max(1,
ldz
*
n
) for row major layout)
.
If
jobz
=
'V'
, and
info
= 0
, then 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)
.
If
jobz
=
'N'
, then
z
is not referenced.
Note: the exact value of
m
is not known in advance and can be computed with a workspace query by setting
nzc
=-1
, see description of the parameter
nzc
.
isuppz
Array, size (
2*max(1,
m
)
).
The support of the eigenvectors in
z
, that is the indices indicating the nonzero elements in
z
. The
i
-th computed eigenvector is nonzero only in elements
isuppz
[2*i - 2]
through
isuppz
[2*i - 1]
. This is relevant in the case when the matrix is split.
isuppz
is only accessed when
jobz
=
'V'
and
n
>0.
tryrac
On exit,
, set to true
.
tryrac
is set to
false
if the matrix does not define its eigenvalues to high relative accuracy.
Return Values
This function returns a value
info
.
If
info
= 0
, the execution is successful.
If
info
=
-i
, the
i
-th parameter had an illegal value.
If
info
> 0
, an internal error occurred.

#### Product and Performance Information

1

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