NAG FL Interface
f08wef (dgghrd)

Note: this routine is deprecated. Replaced by f08wff.
Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f08wef reduces a pair of real matrices (A,B), where B is upper triangular, to the generalized upper Hessenberg form using orthogonal transformations. f08wef is marked as deprecated by LAPACK; the replacement routine is f08wff which makes better use of Level 3 BLAS.

2 Specification

Fortran Interface
Subroutine f08wef ( compq, compz, n, ilo, ihi, a, lda, b, ldb, q, ldq, z, ldz, info)
Integer, Intent (In) :: n, ilo, ihi, lda, ldb, ldq, ldz
Integer, Intent (Out) :: info
Real (Kind=nag_wp), Intent (Inout) :: a(lda,*), b(ldb,*), q(ldq,*), z(ldz,*)
Character (1), Intent (In) :: compq, compz
C Header Interface
#include <nag.h>
void  f08wef_ (const char *compq, const char *compz, const Integer *n, const Integer *ilo, const Integer *ihi, double a[], const Integer *lda, double b[], const Integer *ldb, double q[], const Integer *ldq, double z[], const Integer *ldz, Integer *info, const Charlen length_compq, const Charlen length_compz)
The routine may be called by the names f08wef, nagf_lapackeig_dgghrd or its LAPACK name dgghrd.

3 Description

f08wef is the third step in the solution of the real generalized eigenvalue problem
Ax=λBx.  
The (optional) first step balances the two matrices using f08whf. In the second step, matrix B is reduced to upper triangular form using the QR factorization routine f08aef and this orthogonal transformation Q is applied to matrix A by calling f08agf.
f08wef reduces a pair of real matrices (A,B), where B is upper triangular, to the generalized upper Hessenberg form using orthogonal transformations. This two-sided transformation is of the form
QTAZ=H QTBZ=T  
where H is an upper Hessenberg matrix, T is an upper triangular matrix and Q and Z are orthogonal matrices determined as products of Givens rotations. They may either be formed explicitly, or they may be postmultiplied into input matrices Q1 and Z1, so that
Q1AZ1T=(Q1Q)H(Z1Z)T, Q1BZ1T=(Q1Q)T(Z1Z)T.  

4 References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Moler C B and Stewart G W (1973) An algorithm for generalized matrix eigenproblems SIAM J. Numer. Anal. 10 241–256

5 Arguments

1: compq Character(1) Input
On entry: specifies the form of the computed orthogonal matrix Q.
compq='N'
Do not compute Q.
compq='I'
The orthogonal matrix Q is returned.
compq='V'
q must contain an orthogonal matrix Q1, and the product Q1Q is returned.
Constraint: compq='N', 'I' or 'V'.
2: compz Character(1) Input
On entry: specifies the form of the computed orthogonal matrix Z.
compz='N'
Do not compute Z.
compz='I'
The orthogonal matrix Z is returned.
compz='V'
z must contain an orthogonal matrix Z1, and the product Z1Z is returned.
Constraint: compz='N', 'V' or 'I'.
3: n Integer Input
On entry: n, the order of the matrices A and B.
Constraint: n0.
4: ilo Integer Input
5: ihi Integer Input
On entry: ilo and ihi as determined by a previous call to f08whf. Otherwise, they should be set to 1 and n, respectively.
Constraints:
  • if n>0, 1 ilo ihi n ;
  • if n=0, ilo=1 and ihi=0.
6: a(lda,*) Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array a must be at least max(1,n).
On entry: the matrix A of the matrix pair (A,B). Usually, this is the matrix A returned by f08agf.
On exit: a is overwritten by the upper Hessenberg matrix H.
7: lda Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f08wef is called.
Constraint: ldamax(1,n).
8: b(ldb,*) Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array b must be at least max(1,n).
On entry: the upper triangular matrix B of the matrix pair (A,B). Usually, this is the matrix B returned by the QR factorization routine f08aef.
On exit: b is overwritten by the upper triangular matrix T.
9: ldb Integer Input
On entry: the first dimension of the array b as declared in the (sub)program from which f08wef is called.
Constraint: ldbmax(1,n).
10: q(ldq,*) Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array q must be at least max(1,n) if compq='I' or 'V' and at least 1 if compq='N'.
On entry: if compq='V', q must contain an orthogonal matrix Q1.
If compq='N', q is not referenced.
On exit: if compq='I', q contains the orthogonal matrix Q.
If compq='V', q is overwritten by Q1Q.
11: ldq Integer Input
On entry: the first dimension of the array q as declared in the (sub)program from which f08wef is called.
Constraints:
  • if compq='I' or 'V', ldq max(1,n) ;
  • if compq='N', ldq1.
12: z(ldz,*) Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array z must be at least max(1,n) if compz='V' or 'I' and at least 1 if compz='N'.
On entry: if compz='V', z must contain an orthogonal matrix Z1.
If compz='N', z is not referenced.
On exit: if compz='I', z contains the orthogonal matrix Z.
If compz='V', z is overwritten by Z1Z.
13: ldz Integer Input
On entry: the first dimension of the array z as declared in the (sub)program from which f08wef is called.
Constraints:
  • if compz='V' or 'I', ldz max(1,n) ;
  • if compz='N', ldz1.
14: info Integer Output
On exit: info=0 unless the routine detects an error (see Section 6).

6 Error Indicators and Warnings

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

The reduction to the generalized Hessenberg form is implemented using orthogonal transformations which are backward stable.

8 Parallelism and Performance

f08wef 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

This routine is usually followed by f08xef which implements the QZ algorithm for computing generalized eigenvalues of a reduced pair of matrices.
The complex analogue of this routine is f08wsf.

10 Example

See Section 10 in f08xef and f08ykf.