-
template<typename T>
void sytd2(char *uplo, integer *n, T *a, integer *lda, T *d, T *e, T *tau, integer *info)# Reduction of a real symmetric matrix a to real symmetric tridiagonal form (unblocked algorithm)
Purpose:
Reduction of a real symmetric matrix a to real symmetric tridiagonal form T by an orthogonal similarity transformation(unblocked algorithm): Q**T * A * Q = T.
Further Details
If uplo = 'U', the matrix Q is represented as a product of elementary reflectors Q = H(n-1) . . . H(2) H(1). Each H(i) has the form H(i) = I - tau * V * V**T where tau is a real scalar, and V is a real vector with V(i+1:n) = 0 and V(i) = 1; V(1:i-1) is stored on exit in A(1:i-1,i+1), and tau in tau(i). If uplo = 'L', the matrix Q is represented as a product of elementary reflectors Q = H(1) H(2) . . . H(n-1). Each H(i) has the form H(i) = I - tau * V * V**T where tau is a real scalar, and V is a real vector with V(1:i) = 0 and V(i+1) = 1; V(i+2:n) is stored on exit in A(i+2:n,i), and tau in tau(i). The contents of A on exit are illustrated by the following examples with n = 5: if uplo = 'U': if uplo = 'L': ( d e v2 v3 v4) ( d ) ( d e v3 v4) ( e d ) ( d e v4) ( v1 e d) ( d e ) ( v1 v2 e d ) ( d ) ( v1 v2 v3 e d ) where d and e denote diagonal and off-diagonal elements of T, and vi denotes an element of the vector defining H(i).
- Parameters:
uplo – [in]
uplo is char*
= ‘U’: Upper triangle of a is stored;
= ‘L’: Lower triangle of a is stored.n – [in]
n is integer*
The order of the matrix a. n >= 0.
a – [inout]
a is float/double array, dimension (lda,n)
On entry, the symmetric matrix a.
If uplo = ‘U’, the leading n-by-n upper triangular part of a contains the upper triangular part of the matrix a, and the strictly lower triangular part of a is not referenced.
If uplo = ‘L’, the leading n-by-n lower triangular part of a contains the lower triangular part of the matrix a, and the strictly upper triangular part of a is not referenced.
On exit, if uplo = ‘U’, the diagonal and first superdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements above the first superdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors;
if uplo = ‘L’, the diagonal and first subdiagonal of A are over- written by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array tau, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details.
lda – [in]
lda is integer*
The leading dimension of the array a. lda >= fla_max(1,n).
d – [out]
d is float/double array, dimension (n)
The diagonal elements of the tridiagonal matrix T: D(i) = A(i,i).
e – [out]
e is float/double array, dimension (n-1)
The off-diagonal elements of the tridiagonal matrix T:
E(i) = A(i,i+1) if uplo = ‘U’, E(i) = A(i+1,i) if uplo = ‘L’.tau – [out]
tau is COMPLEX/COMPLEX*16 array, dimension (n-1)
The scalar factors of the elementary reflectors (see Further Details).
INFO – [out]
INFO is INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value.