|
|
◆ zhptrd()
| void zhptrd |
( |
char |
uplo, |
|
|
int |
n, |
|
|
doublecomplex |
ap[], |
|
|
double |
d[], |
|
|
double |
e[], |
|
|
doublecomplex |
tau[], |
|
|
int * |
info |
|
) |
| |
Reduces a complex Hermitian matrix stored in packed form to tridiagonal form
- Purpose
- This routine reduces a complex Hermitian matrix A stored in packed form to real symmetric tridiagonal form T by a unitary similarity transformation: Q^H * A * Q = T.
- Parameters
-
| [in] | uplo | = 'U': Upper triangle of A is stored.
= 'L': Lower triangle of A is stored. |
| [in] | n | Order of the matrix A. (n >= 0) (If n = 0, returns without computation) |
| [in,out] | ap[] | Array ap[lap] (lap >= n(n + 1)/2)
[in] The upper or lower triangle of the symmetric matrix A, packed columnwise in a linear array. The j-th column of A is stored in the array ap[] as follows.
uplo = 'U': ap[i + j*(j + 1)/2] = a[j][i] for 0 <= i <= j <= n - 1.
uplo = 'L': ap[(i + j*(2*n - j - 1)/2] = a[j][i] for 0 <= j < = i <= n - 1.
[out] 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 unitary matrix Q as a product of elementary reflectors. If uplo = 'L', the diagonal and first subdiagonal of A are overwritten by the corresponding elements of the tridiagonal matrix T, and the elements below the first subdiagonal, with the array tau, represent the unitary matrix Q as a product of elementary reflectors. See Further Details. |
| [out] | d[] | Array d[ld] (ld >= n)
The diagonal elements of the tridiagonal matrix T: d[i] = a[i][i]. |
| [out] | e[] | Array e[le] (le >= n - 1)
The off-diagonal elements of the tridiagonal matrix T: e[i] = a[i+1][i] if uplo = 'U', e[i] = a[i][i+1] if uplo = 'L'. |
| [out] | tau[] | Array tau[ltau] (ltau >= n - 1)
The scalar factors of the elementary reflectors (see Further Details). |
| [out] | info | = 0: Successful exit.
= -1: The argument uplo had an illegal value. (uplo != 'U' nor 'L')
= -2: The argument n had an illegal value. (n < 0) |
- 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 where tau is a complex scalar, and v is a complex vector with v(i+1〜n) = 0 and v(i) = 1. v(1〜i-1) is stored on exit in ap[], overwriting A(1〜i-1, i+1), and tau in tau[i-1].
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 where tau is a complex scalar, and v is a complex vector with v(1〜i) = 0 and v(i+1) = 1; v(i+2〜n) is stored on exit in ap[], overwriting A(i+2〜n, i), and tau in tau[i-1].
- Reference
- LAPACK
|