The function may be called by the names: f08hsc, nag_lapackeig_zhbtrd or nag_zhbtrd.
3Description
f08hsc 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 function if required.
The function 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: – Nag_OrderTypeInput
On entry: the order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by . See Section 3.1.3 in the Introduction to the NAG Library CL Interface for a more detailed explanation of the use of this argument.
Constraint:
or .
2: – Nag_VectTypeInput
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 .
3: – Nag_UploTypeInput
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 .
4: – IntegerInput
On entry: , the order of the matrix .
Constraint:
.
5: – IntegerInput
On entry: if , the number of superdiagonals, , of the matrix .
If , the number of subdiagonals, , of the matrix .
Constraint:
.
6: – ComplexInput/Output
Note: the dimension, dim, of the array ab
must be at least
.
On entry: the upper or lower triangle of the Hermitian band matrix .
This is stored as a notional two-dimensional array with row elements or column elements stored contiguously. The storage of elements of , depends on the order and uplo arguments as follows:
if and ,
is stored in , for and ;
if and ,
is stored in , for and ;
if and ,
is stored in , for and ;
if and ,
is stored in , for and .
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.
7: – IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) of the matrix in the array
ab.
Constraint:
.
8: – doubleOutput
On exit: the diagonal elements of the tridiagonal matrix .
9: – doubleOutput
Note: the dimension, dim, of the array e
must be at least
.
On exit: the off-diagonal elements of the tridiagonal matrix .
10: – ComplexInput/Output
Note: the dimension, dim, of the array q
must be at least
when
or ;
when
.
The th element of the matrix is stored in
when ;
when .
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 stride separating row or column elements (depending on the value of order) in the array q.
Constraints:
if or , ;
if , .
12: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument had an illegal value.
NE_ENUM_INT_2
On entry, , and .
Constraint: if or , ;
if , .
NE_INT
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
NE_INT_2
On entry, and .
Constraint: .
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
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
f08hsc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08hsc 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 function. 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 f08hsc to reduce to tridiagonal form , and to form the unitary matrix ; the results are then passed to f08jsc which computes the eigenvalues and eigenvectors of .