3 Description

nag_zhpgvd (f08tqc) first performs a Cholesky factorization of the matrix B as B=UHU, when uplo=Nag_Upper or B=LLH, when uplo=Nag_Lower. The generalized problem is then reduced to a standard symmetric eigenvalue problem

Cx=λx,

which is solved for the eigenvalues and, optionally, the eigenvectors; the eigenvectors are then backtransformed to give the eigenvectors of the original problem.

For the problem Az=λBz, the eigenvectors are normalized so that the matrix of eigenvectors, z, satisfies

ZHAZ=Λ and ZHBZ=I,

where Λ is the diagonal matrix whose diagonal elements are the eigenvalues. For the problem ABz=λz we correspondingly have

5 Arguments

1:
order – Nag_OrderTypeInput

On entry: the order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by order=Nag_RowMajor. See Section 3.2.1.3 in the Essential Introduction for a more detailed explanation of the use of this argument.

Constraint:
order=Nag_RowMajor or Nag_ColMajor.

2:
itype – IntegerInput

On entry: specifies the problem type to be solved.

itype=1

Az=λBz.

itype=2

ABz=λz.

itype=3

BAz=λz.

Constraint:
itype=1, 2 or 3.

3:
job – Nag_JobTypeInput

On entry: indicates whether eigenvectors are computed.

job=Nag_EigVals

Only eigenvalues are computed.

job=Nag_DoBoth

Eigenvalues and eigenvectors are computed.

Constraint:
job=Nag_EigVals or Nag_DoBoth.

4:
uplo – Nag_UploTypeInput

On entry: if uplo=Nag_Upper, the upper triangles of A and B are stored.

If uplo=Nag_Lower, the lower triangles of A and B are stored.

Constraint:
uplo=Nag_Upper or Nag_Lower.

5:
n – IntegerInput

On entry: n, the order of the matrices A and B.

Constraint:
n≥0.

6:
ap[dim] – ComplexInput/Output

Note: the dimension, dim, 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 Hermitian matrix A, packed by rows or columns.

The storage of elements Aij depends on the order and uplo arguments as follows:

if order=Nag_ColMajor and uplo=Nag_Upper, Aij is stored in ap[j-1×j/2+i-1], for i≤j;

if order=Nag_ColMajor and uplo=Nag_Lower, Aij is stored in ap[2n-j×j-1/2+i-1], for i≥j;

if order=Nag_RowMajor and uplo=Nag_Upper, Aij is stored in ap[2n-i×i-1/2+j-1], for i≤j;

if order=Nag_RowMajor and uplo=Nag_Lower, Aij is stored in ap[i-1×i/2+j-1], for i≥j.

An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.

NE_MAT_NOT_POS_DEF

If fail.errnum=n+value, for 1≤value≤n, then the leading minor of order value of B is not positive definite. The factorization of B could not be completed and no eigenvalues or eigenvectors were computed.

7 Accuracy

If B is ill-conditioned with respect to inversion, then the error bounds for the computed eigenvalues and vectors may be large, although when the diagonal elements of B differ widely in magnitude the eigenvalues and eigenvectors may be less sensitive than the condition of B would suggest. See Section 4.10 of Anderson et al. (1999) for details of the error bounds.

The example program below illustrates the computation of approximate error bounds.

8 Parallelism and Performance

nag_zhpgvd (f08tqc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.

nag_zhpgvd (f08tqc) 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 Users' Note for your implementation for any additional implementation-specific information.