The routine may be called by the names f08hsf, nagf_lapackeig_zhbtrd or its LAPACK name zhbtrd.
3Description
f08hsf reduces a Hermitian band matrix to real symmetric tridiagonal form by a unitary similarity transformation:
The unitary matrix is determined as a product of Givens rotation matrices, and may be formed explicitly by the routine if required.
The routine uses a vectorizable form of the reduction, due to Kaufman (1984).
4References
Kaufman L (1984) Banded eigenvalue solvers on vector machines ACM Trans. Math. Software10 73–86
Parlett B N (1998) The Symmetric Eigenvalue Problem SIAM, Philadelphia
5Arguments
1: – Character(1)Input
On entry: indicates whether is to be returned.
is returned.
is updated (and the array q must contain a matrix on entry).
is not required.
Constraint:
, or .
2: – Character(1)Input
On entry: indicates whether the upper or lower triangular part of is stored.
The upper triangular part of is stored.
The lower triangular part of is stored.
Constraint:
or .
3: – IntegerInput
On entry: , the order of the matrix .
Constraint:
.
4: – IntegerInput
On entry: if , the number of superdiagonals, , of the matrix .
If , the number of subdiagonals, , of the matrix .
Constraint:
.
5: – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array ab
must be at least
.
On entry: the upper or lower triangle of the Hermitian band matrix .
The matrix is stored in rows to , more precisely,
if , the elements of the upper triangle of within the band must be stored with element in ;
if , the elements of the lower triangle of within the band must be stored with element in
On exit: ab is overwritten by values generated during the reduction to tridiagonal form.
The first superdiagonal or subdiagonal and the diagonal of the tridiagonal matrix are returned in ab using the same storage format as described above.
6: – IntegerInput
On entry: the first dimension of the array ab as declared in the (sub)program from which f08hsf is called.
Constraint:
.
7: – Real (Kind=nag_wp) arrayOutput
On exit: the diagonal elements of the tridiagonal matrix .
8: – Real (Kind=nag_wp) arrayOutput
Note: the dimension of the array e
must be at least
.
On exit: the off-diagonal elements of the tridiagonal matrix .
9: – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array q
must be at least
if or and at least if .
On entry: if , q must contain the matrix formed in a previous stage of the reduction (for example, the reduction of a banded Hermitian-definite generalized eigenproblem); otherwise q need not be set.
On entry: the first dimension of the array q as declared in the (sub)program from which f08hsf is called.
Constraints:
if or , ;
if , .
11: – Complex (Kind=nag_wp) arrayWorkspace
12: – IntegerOutput
On exit: unless the routine detects an error (see Section 6).
6Error Indicators and Warnings
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
7Accuracy
The computed tridiagonal matrix is exactly similar to a nearby matrix , where
is a modestly increasing function of , and is the machine precision.
The elements of themselves may be sensitive to small perturbations in or to rounding errors in the computation, but this does not affect the stability of the eigenvalues and eigenvectors.
The computed matrix differs from an exactly unitary matrix by a matrix such that
where is the machine precision.
8Parallelism and Performance
f08hsf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08hsf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
9Further Comments
The total number of real floating-point operations is approximately if with additional operations if .
This example computes all the eigenvalues and eigenvectors of the matrix , where
Here is Hermitian and is treated as a band matrix. The program first calls f08hsf to reduce to tridiagonal form , and to form the unitary matrix ; the results are then passed to f08jsf which computes the eigenvalues and eigenvectors of .