NAG FL Interface
f08hef (dsbtrd)
1
Purpose
f08hef reduces a real symmetric band matrix to tridiagonal form.
2
Specification
Fortran Interface
Subroutine f08hef ( |
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 (Inout) |
:: |
ab(ldab,*), q(ldq,*) |
Real (Kind=nag_wp), Intent (Out) |
:: |
d(n), e(n-1), work(n) |
Character (1), Intent (In) |
:: |
vect, uplo |
|
C Header Interface
#include <nag.h>
void |
f08hef_ (const char *vect, const char *uplo, const Integer *n, const Integer *kd, double ab[], const Integer *ldab, double d[], double e[], double q[], const Integer *ldq, double work[], Integer *info, const Charlen length_vect, const Charlen length_uplo) |
|
C++ Header Interface
#include <nag.h> extern "C" {
void |
f08hef_ (const char *vect, const char *uplo, const Integer &n, const Integer &kd, double ab[], const Integer &ldab, double d[], double e[], double q[], const Integer &ldq, double work[], Integer &info, const Charlen length_vect, const Charlen length_uplo) |
}
|
The routine may be called by the names f08hef, nagf_lapackeig_dsbtrd or its LAPACK name dsbtrd.
3
Description
f08hef reduces a symmetric band matrix
to symmetric tridiagonal form
by an orthogonal similarity transformation:
The orthogonal 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:
– Integer
Input
-
On entry: , the order of the matrix .
Constraint:
.
-
4:
– Integer
Input
-
On entry: if
, the number of superdiagonals,
, of the matrix
.
If , the number of subdiagonals, , of the matrix .
Constraint:
.
-
5:
– Real (Kind=nag_wp) array
Input/Output
-
Note: the second dimension of the array
ab
must be at least
.
On entry: the upper or lower triangle of the
by
symmetric 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:
– Integer
Input
-
On entry: the first dimension of the array
ab as declared in the (sub)program from which
f08hef is called.
Constraint:
.
-
7:
– Real (Kind=nag_wp) array
Output
-
On exit: the diagonal elements of the tridiagonal matrix .
-
8:
– Real (Kind=nag_wp) array
Output
-
On exit: the off-diagonal elements of the tridiagonal matrix .
-
9:
– Real (Kind=nag_wp) array
Input/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 symmetric-definite generalized eigenproblem); otherwise
q need not be set.
On exit: if
or
, the
by
matrix
.
If
,
q is not referenced.
-
10:
– Integer
Input
-
On entry: the first dimension of the array
q as declared in the (sub)program from which
f08hef is called.
Constraints:
- if or , ;
- if , .
-
11:
– Real (Kind=nag_wp) array
Workspace
-
-
12:
– Integer
Output
-
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 orthogonal matrix by a matrix
such that
where
is the
machine precision.
8
Parallelism and Performance
f08hef is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08hef 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 floating-point operations is approximately if with additional operations if .
The complex analogue of this routine is
f08hsf.
10
Example
This example computes all the eigenvalues and eigenvectors of the matrix
, where
Here
is symmetric and is treated as a band matrix. The program first calls
f08hef to reduce
to tridiagonal form
, and to form the orthogonal matrix
; the results are then passed to
f08jef which computes the eigenvalues and eigenvectors of
.
10.1
Program Text
10.2
Program Data
10.3
Program Results