?sytrd
?sytrd
Reduces a real symmetric matrix to tridiagonal form.
Syntax
lapack_int
LAPACKE_ssytrd
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
float
*
a
,
lapack_int
lda
,
float
*
d
,
float
*
e
,
float
*
tau
);
lapack_int
LAPACKE_dsytrd
(
int
matrix_layout
,
char
uplo
,
lapack_int
n
,
double
*
a
,
lapack_int
lda
,
double
*
d
,
double
*
e
,
double
*
tau
);
Include Files
- mkl.h
Description
The routine reduces a real symmetric matrix . The orthogonal matrix
A
to symmetric tridiagonal form T
by an orthogonal similarity transformation: A
= Q*T*Q
T
Q
is not formed explicitly but is represented as a product of n
-1 elementary reflectors. Routines are provided for working with Q
in this representation (see
.Application Notes
below)Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- uplo
- Must be'U'or'L'.If,uplo='U'astores the upper triangular part ofA.If,uplo='L'astores the lower triangular part ofA.
- n
- The order of the matrixA().n≥0
- a
- a(size max(1,is an array containing either upper or lower triangular part of the matrixlda*n))A, as specified byuplo. If, the leadinguplo='U'n-by-nupper triangular part ofacontains the upper triangular part of the matrixA, and the strictly lower triangular part ofAis not referenced. If, the leadinguplo='L'n-by-nlower triangular part ofacontains the lower triangular part of the matrixA, and the strictly upper triangular part ofAis not referenced.
- lda
- The leading dimension ofa; at least max(1,n).
Output Parameters
- a
- On exit,if, the diagonal and first superdiagonal ofuplo='U'Aare overwritten by the corresponding elements of the tridiagonal matrixT, and the elements above the first superdiagonal, with the arraytau, represent the orthogonal matrixQas a product of elementary reflectors;if, the diagonal and first subdiagonal ofuplo='L'Aare overwritten by the corresponding elements of the tridiagonal matrixT, and the elements below the first subdiagonal, with the arraytau, represent the orthogonal matrixQas a product of elementary reflectors.
- d,e,tau
- Arrays:dcontains the diagonal elements of the matrixT.The size ofdmust be at least max(1,n).econtains the off-diagonal elements ofT.The size ofemust be at least max(1,n-1).taustores (n-1) scalars that define elementary reflectors in decomposition of the orthogonal matrixQin a product ofelementary reflectors.n-1tau(n) is used as workspace.The size oftaumust be at least max(1,n).
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.Application Notes
The computed matrix , where is a modestly increasing function of
T
is exactly similar to a matrix A
+E
||
, E
||2
= c
(n
)*ε
*||A
||2
c
(n
)n
, and ε
is the machine precision.The approximate number of floating-point operations is (4/3)
n
3
.After calling
this routine, you can
call the following:
The complex counterpart of this routine is ?hetrd.