F08TEF (DSPGST) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F08TEF (DSPGST)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

F08TEF (DSPGST) reduces a real symmetric-definite generalized eigenproblem Az=λBz, ABz=λz or BAz=λz to the standard form Cy=λy, where A is a real symmetric matrix and B has been factorized by F07GDF (DPPTRF), using packed storage.

2  Specification

SUBROUTINE F08TEF ( ITYPE, UPLO, N, AP, BP, INFO)
INTEGER  ITYPE, N, INFO
REAL (KIND=nag_wp)  AP(*), BP(*)
CHARACTER(1)  UPLO
The routine may be called by its LAPACK name dspgst.

3  Description

To reduce the real symmetric-definite generalized eigenproblem Az=λBz, ABz=λz or BAz=λz to the standard form Cy=λy using packed storage, F08TEF (DSPGST) must be preceded by a call to F07GDF (DPPTRF) which computes the Cholesky factorization of B; B must be positive definite.
The different problem types are specified by the parameter ITYPE, as indicated in the table below. The table shows how C is computed by the routine, and also how the eigenvectors z of the original problem can be recovered from the eigenvectors of the standard form.
ITYPE Problem UPLO B C z
1 Az=λBz 'U'
'L'
UTU 
LLT
U-TAU-1 
L-1AL-T
U-1y 
L-Ty
2 ABz=λz 'U'
'L'
UTU 
LLT
UAUT 
LTAL
U-1y 
L-Ty
3 BAz=λz 'U'
'L'
UTU 
LLT
UAUT 
LTAL
UTy 
Ly

4  References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

5  Parameters

1:     ITYPE – INTEGERInput
On entry: indicates how the standard form is computed.
ITYPE=1
  • if UPLO='U', C=U-TAU-1;
  • if UPLO='L', C=L-1AL-T.
ITYPE=2 or 3
  • if UPLO='U', C=UAUT;
  • if UPLO='L', C=LTAL.
Constraint: ITYPE=1, 2 or 3.
2:     UPLO – CHARACTER(1)Input
On entry: indicates whether the upper or lower triangular part of A is stored and how B has been factorized.
UPLO='U'
The upper triangular part of A is stored and B=UTU.
UPLO='L'
The lower triangular part of A is stored and B=LLT.
Constraint: UPLO='U' or 'L'.
3:     N – INTEGERInput
On entry: n, the order of the matrices A and B.
Constraint: N0.
4:     AP(*) – REAL (KIND=nag_wp) arrayInput/Output
Note: the dimension of the array AP must be at least max1,N×N+1/2.
On entry: the upper or lower triangle of the n by n symmetric matrix A, packed by columns.
More precisely,
  • if UPLO='U', the upper triangle of A must be stored with element Aij in APi+jj-1/2 for ij;
  • if UPLO='L', the lower triangle of A must be stored with element Aij in APi+2n-jj-1/2 for ij.
On exit: the upper or lower triangle of AP is overwritten by the corresponding upper or lower triangle of C as specified by ITYPE and UPLO, using the same packed storage format as described above.
5:     BP(*) – REAL (KIND=nag_wp) arrayInput
Note: the dimension of the array BP must be at least max1,N×N+1/2.
On entry: the Cholesky factor of B as specified by UPLO and returned by F07GDF (DPPTRF).
6:     INFO – INTEGEROutput
On exit: INFO=0 unless the routine detects an error (see Section 6).

6  Error Indicators and Warnings

Errors or warnings detected by the routine:
INFO<0
If INFO=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.

7  Accuracy

Forming the reduced matrix C is a stable procedure. However it involves implicit multiplication by B-1 if (ITYPE=1) or B (if ITYPE=2 or 3). 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 B is ill-conditioned with respect to inversion. See the document for F08SAF (DSYGV) for further details.

8  Further Comments

The total number of floating point operations is approximately n3.
The complex analogue of this routine is F08TSF (ZHPGST).

9  Example

This example computes all the eigenvalues of Az=λBz, where
A = 0.24 0.39 0.42 -0.16 0.39 -0.11 0.79 0.63 0.42 0.79 -0.25 0.48 -0.16 0.63 0.48 -0.03   and   B= 4.16 -3.12 0.56 -0.10 -3.12 5.03 -0.83 1.09 0.56 -0.83 0.76 0.34 -0.10 1.09 0.34 1.18 ,
using packed storage. Here B 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 Cy=λy; then F08GEF (DSPTRD) to reduce C to tridiagonal form, and F08JFF (DSTERF) to compute the eigenvalues.

9.1  Program Text

Program Text (f08tefe.f90)

9.2  Program Data

Program Data (f08tefe.d)

9.3  Program Results

Program Results (f08tefe.r)


F08TEF (DSPGST) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012