NAG Library Routine Document
f08tef
(dspgst)
1
Purpose
f08tef (dspgst) reduces a real symmetric-definite generalized eigenproblem
,
or
to the standard form
, where
is a real symmetric matrix and
has been factorized by
f07gdf (dpptrf), using packed storage.
2
Specification
Fortran Interface
Integer, Intent (In) | :: |
itype,
n | Integer, Intent (Out) | :: |
info | Real (Kind=nag_wp), Intent (In) | :: |
bp(*) | Real (Kind=nag_wp), Intent (Inout) | :: |
ap(*) | Character (1), Intent (In) | :: |
uplo |
|
C Header Interface
#include nagmk26.h
void |
f08tef_ (
const Integer *itype,
const char *uplo,
const Integer *n,
double ap[],
const double bp[],
Integer *info,
const Charlen length_uplo) |
|
The routine may be called by its
LAPACK
name dspgst.
3
Description
To reduce the real symmetric-definite generalized eigenproblem
,
or
to the standard form
using packed storage,
f08tef (dspgst) must be preceded by a call to
f07gdf (dpptrf) which computes the Cholesky factorization of
;
must be positive definite.
The different problem types are specified by the argument
itype, as indicated in the table below. The table shows how
is computed by the routine, and also how the eigenvectors
of the original problem can be recovered from the eigenvectors of the standard form.
itype |
Problem |
uplo |
|
|
|
|
|
'U'
'L' |
|
|
|
|
|
'U'
'L' |
|
|
|
|
|
'U'
'L' |
|
|
|
4
References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5
Arguments
- 1: – IntegerInput
-
On entry: indicates how the standard form is computed.
-
- if , ;
- if , .
- or
-
- if , ;
- if , .
Constraint:
, or .
- 2: – Character(1)Input
-
On entry: indicates whether the upper or lower triangular part of
is stored and how
has been factorized.
- The upper triangular part of is stored and .
- The lower triangular part of is stored and .
Constraint:
or .
- 3: – IntegerInput
-
On entry: , the order of the matrices and .
Constraint:
.
- 4: – Real (Kind=nag_wp) arrayInput/Output
-
Note: the dimension of the array
ap
must be at least
.
On entry: the upper or lower triangle of the
by
symmetric matrix
, packed by columns.
More precisely,
- if , the upper triangle of must be stored with element in for ;
- if , the lower triangle of must be stored with element in for .
On exit: the upper or lower triangle of
ap is overwritten by the corresponding upper or lower triangle of
as specified by
itype and
uplo, using the same packed storage format as described above.
- 5: – Real (Kind=nag_wp) arrayInput
-
Note: the dimension of the array
bp
must be at least
.
On entry: the Cholesky factor of
as specified by
uplo and returned by
f07gdf (dpptrf).
- 6: – 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
Forming the reduced matrix
is a stable procedure. However it involves implicit multiplication by
if (
) or
(if
or
). When
f08tef (dspgst) is used as a step in the computation of eigenvalues and eigenvectors of the original problem, there may be a significant loss of accuracy if
is ill-conditioned with respect to inversion.
See the document for
f08saf (dsygv) for further details.
8
Parallelism and Performance
f08tef (dspgst) 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 .
The complex analogue of this routine is
f08tsf (zhpgst).
10
Example
This example computes all the eigenvalues of
, where
using packed storage. Here
is symmetric positive definite and must first be factorized by
f07gdf (dpptrf). The program calls
f08tef (dspgst) to reduce the problem to the standard form
; then
f08gef (dsptrd) to reduce
to tridiagonal form, and
f08jff (dsterf) to compute the eigenvalues.
10.1
Program Text
Program Text (f08tefe.f90)
10.2
Program Data
Program Data (f08tefe.d)
10.3
Program Results
Program Results (f08tefe.r)