NAG Library Function Document
nag_zhbtrd (f08hsc)
1
Purpose
nag_zhbtrd (f08hsc) reduces a complex Hermitian band matrix to tridiagonal form.
2
Specification
#include <nag.h> |
#include <nagf08.h> |
void |
nag_zhbtrd (Nag_OrderType order,
Nag_VectType vect,
Nag_UploType uplo,
Integer n,
Integer kd,
Complex ab[],
Integer pdab,
double d[],
double e[],
Complex q[],
Integer pdq,
NagError *fail) |
|
3
Description
nag_zhbtrd (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).
4
References
Kaufman L (1984) Banded eigenvalue solvers on vector machines ACM Trans. Math. Software 10 73–86
Parlett B N (1998) The Symmetric Eigenvalue Problem SIAM, Philadelphia
5
Arguments
- 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.3.1.3 in How to Use the NAG Library and its Documentation 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
by
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
-
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 exit: if
or
, the
by
matrix
.
If
,
q is not referenced.
- 11:
– IntegerInput
-
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 3.7 in How to Use the NAG Library and its Documentation).
6
Error Indicators and Warnings
- NE_ALLOC_FAIL
-
Dynamic memory allocation failed.
See
Section 2.3.1.2 in How to Use the NAG Library and its Documentation 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 2.7.6 in How to Use the NAG Library and its Documentation for further information.
- NE_NO_LICENCE
-
Your licence key may have expired or may not have been installed correctly.
See
Section 2.7.5 in How to Use the NAG Library and its Documentation for further information.
7
Accuracy
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.
8
Parallelism and Performance
nag_zhbtrd (f08hsc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
nag_zhbtrd (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.
The total number of real floating-point operations is approximately if with additional operations if .
The real analogue of this function is
nag_dsbtrd (f08hec).
10
Example
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
nag_zhbtrd (f08hsc) to reduce
to tridiagonal form
, and to form the unitary matrix
; the results are then passed to
nag_zsteqr (f08jsc) which computes the eigenvalues and eigenvectors of
.
10.1
Program Text
Program Text (f08hsce.c)
10.2
Program Data
Program Data (f08hsce.d)
10.3
Program Results
Program Results (f08hsce.r)