NAG FL Interface
f08tsf (zhpgst)

Settings help

FL Name Style:

FL Specification Language:

1 Purpose

f08tsf reduces a complex Hermitian-definite generalized eigenproblem Az=λBz, ABz=λz or BAz=λz to the standard form Cy=λy, where A is a complex Hermitian matrix and B has been factorized by f07grf, using packed storage.

2 Specification

Fortran Interface
Subroutine f08tsf ( itype, uplo, n, ap, bp, info)
Integer, Intent (In) :: itype, n
Integer, Intent (Out) :: info
Complex (Kind=nag_wp), Intent (In) :: bp(*)
Complex (Kind=nag_wp), Intent (Inout) :: ap(*)
Character (1), Intent (In) :: uplo
C Header Interface
#include <nag.h>
void  f08tsf_ (const Integer *itype, const char *uplo, const Integer *n, Complex ap[], const Complex bp[], Integer *info, const Charlen length_uplo)
The routine may be called by the names f08tsf, nagf_lapackeig_zhpgst or its LAPACK name zhpgst.

3 Description

To reduce the complex Hermitian-definite generalized eigenproblem Az=λBz, ABz=λz or BAz=λz to the standard form Cy=λy using packed storage, f08tsf must be preceded by a call to f07grf which computes the Cholesky factorization of B; B must be positive definite.
The different problem types are specified by the argument 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'
2 ABz=λz 'U'
3 BAz=λz 'U'

4 References

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

5 Arguments

1: itype Integer Input
On entry: indicates how the standard form is computed.
  • if uplo='U', C=U-HAU-1;
  • if uplo='L', C=L-1AL-H.
itype=2 or 3
  • if uplo='U', C=UAUH;
  • if uplo='L', C=LHAL.
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.
The upper triangular part of A is stored and B=UHU.
The lower triangular part of A is stored and B=LLH.
Constraint: uplo='U' or 'L'.
3: n Integer Input
On entry: n, the order of the matrices A and B.
Constraint: n0.
4: ap(*) Complex (Kind=nag_wp) array Input/Output
Note: the dimension of the array ap must be at least max(1,n×(n+1)/2).
On entry: the upper or lower triangle of the n×n Hermitian matrix A, packed by columns.
More precisely,
  • if uplo='U', the upper triangle of A must be stored with element Aij in ap(i+j(j-1)/2) for ij;
  • if uplo='L', the lower triangle of A must be stored with element Aij in ap(i+(2n-j)(j-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(*) Complex (Kind=nag_wp) array Input
Note: the dimension of the array bp must be at least max(1,n×(n+1)/2).
On entry: the Cholesky factor of B as specified by uplo and returned by f07grf.
6: info Integer Output
On exit: info=0 unless the routine detects an error (see Section 6).

6 Error Indicators and Warnings

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 f08tsf 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 f08snf for further details.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
f08tsf 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.

9 Further Comments

The total number of real floating-point operations is approximately 4n3.
The real analogue of this routine is f08tef.

10 Example

This example computes all the eigenvalues of Az=λBz, where
A = ( -7.36+0.00i 0.77-0.43i -0.64-0.92i 3.01-6.97i 0.77+0.43i 3.49+0.00i 2.19+4.45i 1.90+3.73i -0.64+0.92i 2.19-4.45i 0.12+0.00i 2.88-3.17i 3.01+6.97i 1.90-3.73i 2.88+3.17i -2.54+0.00i )  
B = ( 3.23+0.00i 1.51-1.92i 1.90+0.84i 0.42+2.50i 1.51+1.92i 3.58+0.00i -0.23+1.11i -1.18+1.37i 1.90-0.84i -0.23-1.11i 4.09+0.00i 2.33-0.14i 0.42-2.50i -1.18-1.37i 2.33+0.14i 4.29+0.00i ) ,  
using packed storage. Here B is Hermitian positive definite and must first be factorized by f07grf. The program calls f08tsf to reduce the problem to the standard form Cy=λy; then f08gsf to reduce C to tridiagonal form, and f08jff to compute the eigenvalues.

10.1 Program Text

Program Text (f08tsfe.f90)

10.2 Program Data

Program Data (f08tsfe.d)

10.3 Program Results

Program Results (f08tsfe.r)