Developer Reference

  • 0.10
  • 10/21/2020
  • Public Content
Contents

?pteqr

Computes all eigenvalues and (optionally) all eigenvectors of a real symmetric positive-definite tridiagonal matrix.

Syntax

lapack_int LAPACKE_spteqr
(
int
matrix_layout
,
char
compz
,
lapack_int
n
,
float*
d
,
float*
e
,
float*
z
,
lapack_int
ldz
);
lapack_int LAPACKE_dpteqr
(
int
matrix_layout
,
char
compz
,
lapack_int
n
,
double*
d
,
double*
e
,
double*
z
,
lapack_int
ldz
);
lapack_int LAPACKE_cpteqr
(
int
matrix_layout
,
char
compz
,
lapack_int
n
,
float*
d
,
float*
e
,
lapack_complex_float*
z
,
lapack_int
ldz
);
lapack_int LAPACKE_zpteqr
(
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 positive-definite 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 real symmetric (or complex Hermitian) positive-definite matrices
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
= (
QZ
)*
Λ
*(
QZ
)
H
. Before calling
?pteqr
, 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'
)
The routine first factorizes
T
as
L*D*L
H
where
L
is a unit lower bidiagonal matrix, and
D
is a diagonal matrix. Then it forms the bidiagonal matrix
B
=
L*D
1/2
and calls
?bdsqr
to compute the singular values of
B
, which are the square roots of the eigenvalues of
T
.
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
A
(and the array
z
must contain the matrix
Q
on entry).
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
compz
=
'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 descending order, unless
info
> 0
.
See also
info
.
e
On exit, the array is overwritten.
z
If
info
= 0
, contains an
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 leading minor of order
i
(and hence
T
itself) is not positive-definite.
If
info
=
n
+
i
, the algorithm for computing singular values failed to converge;
i
off-diagonal elements have not converged to zero.
If
info
=
-i
, the
i
-th parameter had an illegal value.
Application Notes
If
λ
i
is an exact eigenvalue, and
μ
i
is the corresponding computed value, then
|
μ
i
-
λ
i
|
c
(
n
)*
ε
*
K
*
λ
i
where
c
(
n
) is a modestly increasing function of
n
,
ε
is the machine precision, and
K
= ||
DTD
||
2
*||(
DTD
)
-1
||
2
,
D
is diagonal with
d
i
i
=
t
i
i
-1/2
.
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:
θ
(
u
i
,
w
i
)
c
(
n
)
ε
K
/ min
i
j
(|
λ
i
-
λ
j
|/|
λ
i
+
λ
j
|)
.
Here
min
i
j
(|
λ
i
-
λ
j
|/|
λ
i
+
λ
j
|)
is the relative gap between
λ
i
and the other eigenvalues.
The total number of floating-point operations depends on how rapidly the algorithm converges.
Typically, it is about
30
n
2
if
compz
=
'N'
;
6
n
3
(for complex flavors,
12
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