NAG Library Routine Document
f08hsf
(zhbtrd)
1
Purpose
f08hsf (zhbtrd) reduces a complex Hermitian band matrix to tridiagonal form.
2
Specification
Fortran Interface
Subroutine f08hsf ( |
vect,
uplo,
n,
kd,
ab,
ldab,
d,
e,
q,
ldq,
work,
info) |
Integer, Intent (In) | :: |
n,
kd,
ldab,
ldq | Integer, Intent (Out) | :: |
info | Real (Kind=nag_wp), Intent (Out) | :: |
d(n),
e(n-1) | Complex (Kind=nag_wp), Intent (Inout) | :: |
ab(ldab,*),
q(ldq,*) | Complex (Kind=nag_wp), Intent (Out) | :: |
work(n) | Character (1), Intent (In) | :: |
vect,
uplo |
|
C Header Interface
#include nagmk26.h
void |
f08hsf_ (
const char *vect,
const char *uplo,
const Integer *n,
const Integer *kd,
Complex ab[],
const Integer *ldab,
double d[],
double e[],
Complex q[],
const Integer *ldq,
Complex work[],
Integer *info,
const Charlen length_vect,
const Charlen length_uplo) |
|
The routine may be called by its
LAPACK
name zhbtrd.
3
Description
f08hsf (zhbtrd) 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).
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: – 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
by
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 (zhbtrd) is called.
Constraint:
.
- 7: – Real (Kind=nag_wp) arrayOutput
-
On exit: the diagonal elements of the tridiagonal matrix .
- 8: – Real (Kind=nag_wp) arrayOutput
-
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 exit: if
or
, the
by
matrix
.
If
,
q is not referenced.
- 10: – IntegerInput
-
On entry: the first dimension of the array
q as declared in the (sub)program from which
f08hsf (zhbtrd) 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).
6
Error Indicators and Warnings
-
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
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
f08hsf (zhbtrd) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08hsf (zhbtrd) 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.
The total number of real floating-point operations is approximately if with additional operations if .
The real analogue of this routine is
f08hef (dsbtrd).
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
f08hsf (zhbtrd) to reduce
to tridiagonal form
, and to form the unitary matrix
; the results are then passed to
f08jsf (zsteqr) which computes the eigenvalues and eigenvectors of
.
10.1
Program Text
Program Text (f08hsfe.f90)
10.2
Program Data
Program Data (f08hsfe.d)
10.3
Program Results
Program Results (f08hsfe.r)