Visible to Intel only — GUID: GUID-16F59DD8-E1D0-4698-A148-DAC11D2C21B8
Visible to Intel only — GUID: GUID-16F59DD8-E1D0-4698-A148-DAC11D2C21B8
?laqz0
Implements the multishift QZ method with aggressive early deflation for finding the generalized eigenvalues of the matrix pair (A,B).
FORTRAN 77:
call slaqz0(wants, wantq, wantz, n, ilo, ihi, a, lda, b, ldb, alphar, alphai, beta, q, ldq, z, ldz, work, lwork, rec, info)
call dlaqz0(wants, wantq, wantz, n, ilo, ihi, a, lda, b, ldb, alphar, alphai, beta, q, ldq, z, ldz, work, lwork, rec, info)
call claqz0(wants, wantq, wantz, n, ilo, ihi, a, lda, b, ldb, alpha, beta, q, ldq, z, ldz, work, lwork, rwork, rec, info)
call zlaqz0(wants, wantq, wantz, n, ilo, ihi, a, lda, b, ldb, alpha, beta, q, ldq, z, ldz, work, lwork, rwork, rec, info)
The FORTRAN 77 interfaces are specified in the mkl_lapack.fi and mkl_lapack.h include files.
The routine computes the eigenvalues of a real/complex matrix pair (A,B), where A is an upper Hessenberg matrix and B is upper triangular, using the double-shift version (for real flavors) or single-shift version (for complex flavors) of the multishift QZ method with aggressive early deflation.
For real flavors:
If wants = 'S', then the Hessenberg-triangular pair (A,B) is also reduced to generalized Schur form:
A = Q*S*Z^T, B = Q *P*Z^T
where Q and Z are orthogonal matrices, P is an upper triangular matrix, and S is a quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal blocks. The 1-by-1 blocks correspond to real eigenvalues of the matrix pair (A,B) and the 2-by-2 blocks correspond to complex conjugate pairs of eigenvalues.
Additionally, the 2-by-2 upper triangular diagonal blocks of P corresponding to 2-by-2 blocks of S are reduced to positive diagonal form; that is, if S(j+1,j) is non-zero, then P(j+1,j) = P(j,j+1) = 0, P(j,j) > 0, and P(j+1,j+1) > 0.
For complex flavors:
If wants = 'S', then the Hessenberg-triangular pair (A,B) is also reduced to generalized Schur form:
A = Q* S*Z^H, B = Q*P*Z^H
where Q and Z are unitary matrices, P is an upper triangular matrix, and S is a quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal blocks.
For all function flavors:
Optionally, the orthogonal/unitary matrix Q from the generalized Schur factorization may be postmultiplied into an input matrix Q1, and the orthogonal/unitary matrix Z may be postmultiplied into an input matrix Z1.
If Q1 and Z1 are the orthogonal/unitary matrices from ?gghrd that reduced the matrix pair (A1,B1) to generalized upper Hessenberg form (A,B), then the output matrices Q1*Q and Z1*Z are the orthogonal/unitary factors from the generalized Schur factorization of (A,B):
A1 = (Q1*Q)S *(Z1*Z)^H, B1 = (Q1*Q)*P(Z1*Z)^H
To avoid overflow, eigenvalues of the matrix pair (A,B) are computed as a pair of values (alpha,beta). For claqz0/zlaqz0, alpha and beta are complex, and for slaqz0/dlaqz0, alpha is complex and beta real.
If beta is nonzero, λ = alpha/beta is an eigenvalue of the generalized nonsymmetric eigenvalue problem (GNEP):
A*x = λ*B*x
and if alpha is nonzero, μ = beta/alpha is an eigenvalue of the alternate form of the GNEP:
μ*A*y = B*y
Real eigenvalues (for real flavors) or the values of alpha and beta for the i-th eigenvalue (for complex flavors) can be read directly from the generalized Schur form:
alpha = S(i,i), beta = P(i,i)
The data types are given for the Fortran interface. A datatype placeholder, if present, is used for the C interface data types.
Refer to the C Interface Conventions topic in the C-based reference for the C interface principal conventions and type definitions.
- wants
-
CHARACTER*1. Specifies the operations to be performed. Must be 'E' or 'S'.
If wants = 'E', then compute eigenvalues only.
If wants = 'S', then compute eigenvalues and the Schur form.
- wantq
-
CHARACTER*1. Must be 'N', 'I', or 'V'.
If wantq = 'N', left Schur vectors (q) are not computed.
If wantq = 'I', q is initialized to the unit matrix and the matrix of left Schur vectors of (A, B) is returned.
If wantq = 'V', q must contain an orthogonal/unitary matrix Q1 on entry and the product Q1*Q is returned.
- wantz
-
CHARACTER*1. Must be 'N', 'I', or 'V'.
If wantz = 'N', right Schur vectors (z) are not computed.
If wantz = 'I', z is initialized to the unit matrix and the matrix of right Schur vectors of (A,B) is returned.
If wantz = 'V', z must contain an orthogonal/unitary matrix Z1 on entry and the product Z1*Z is returned.
- n
-
INTEGER. The order of the matrices A, B, Q, and Z (n ≥ 0).
- ilo, ihi
-
INTEGER. ilo and ihi mark the rows and columns of A which are in Hessenberg form. It is assumed that A is already upper triangular in rows and columns 1:ilo-1 and ihi+1:n.
Constraint:
If n > 0, then 1 ≤ ilo ≤ ihi ≤ n.
If n = 0, then ilo = 1 and ihi = 0.
- a, b, q, z, work
-
REAL for slaqz0..
DOUBLE PRECISION for dlaqz0.
COMPLEX for claqz0.
DOUBLE COMPLEX for zlaqz0.
Arrays:
On entry, a(lda,*) contains the n-by-n upper Hessenberg matrix A. The second dimension of a must be at least max(1, n).
On entry, b(ldb,*) contains the n-by-n upper triangular matrix B. The second dimension of b must be at least max(1, n).
q (ldq,*):
On entry, if wantq = 'V', this array contains the orthogonal/unitary matrix Q1 used in the reduction of (A1,B1) to generalized Hessenberg form.
If wantq = 'N', then q is not referenced. The second dimension of q must be at least max(1, n).
z (ldz,*):
On entry, if wantz = 'V', this array contains the orthogonal/unitary matrix Z1 used in the reduction of (A1,B1) to generalized Hessenberg form (A, B).
If wantz = 'N', then z is not referenced.
The second dimension of z must be at least max(1, n).
work is a workspace array; its dimension is max(1, lwork).
- lda
-
INTEGER. The first dimension of a; at least max(1, n).
- ldb
-
INTEGER. The first dimension of b; at least max(1, n).
- ldq
-
INTEGER. The first dimension of q.
If wantq = 'N', then ldq ≥ 1.
If wantq = 'I' or 'V', then ldq ≥ max(1, n).
- ldz
-
INTEGER. The first dimension of z.
If wantq = 'N', then ldz ≥ 1.
If wantq = 'I'or 'V', then ldz ≥ max(1, n).
- rec
-
INTEGER. Indicates the current recursion level. Should be set to 0 on first call.
- lwork
-
INTEGER. The dimension of the array work. lwork ≥ max(1, n).
If lwork = -1, then a workspace query is assumed; the routine calculates only the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued by xerbla.
For details, see Application Notes.
- rwork
-
REAL for claqz0.
DOUBLE PRECISION for zlaqz0.
Workspace array with DIMENSION at least max(1, n). Used in complex flavors only.
- a
-
For real flavors:
If wants = 'S', then on exit a contains the upper quasi-triangular matrix S from the generalized Schur factorization; 2-by-2 diagonal blocks (corresponding to complex conjugate pairs of eigenvalues) are returned in standard form, with a(i,i) = a(i+1, i+1) and a(i+1, i) * a(i, i+1) < 0.
If wants = 'E', then on exit the diagonal blocks of a match those of S, but the rest of a is unspecified.
For complex flavors:
If wants = 'S', then on exit a contains the upper triangular matrix S from the generalized Schur factorization.
If wants = 'E', then on exit the diagonal of a matches that of S, but the rest of a is unspecified.
- b
-
If wants = 'S', then on exit b contains the upper triangular matrix P from the generalized Schur factorization.
For real flavors:
2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks of S are reduced to positive diagonal form; that is, if b(j+1,j) is non-zero, then b(j+1,j)=b(j,j+1)=0 and b(j,j) and b(j+1,j+1) will be positive.
If wants = 'E', then on exit the diagonal blocks of b match those of P, but the rest of b is unspecified.
For complex flavors:
if wants = 'E', then on exit the diagonal of b matches that of P, but the rest of b is unspecified.
- alphar, alphai
-
REAL for slaqz0;
DOUBLE PRECISION for dlaqz0.
Arrays, DIMENSION at least max(1, n). The real and imaginary parts, respectively, of each scalar alpha define an eigenvalue of GNEP.
If alphai(j) is zero, then the j-th eigenvalue is real; if positive, then the j-th and (j+1)-th eigenvalues are a complex conjugate pair, with alphai(j+1) = -alphai(j).
- alpha
-
COMPLEX for claqz0.
DOUBLE COMPLEX for zlaqz0.
Array, DIMENSION at least max(1, n).
The complex scalars alpha defines the eigenvalues of GNEP. alphai(i) = S(i,i) in the generalized Schur factorization.
- beta
-
REAL for slaqz0.
DOUBLE PRECISION for dlaqz0
COMPLEX for claqz0
DOUBLE COMPLEX for zlaqz0.
Array, DIMENSION at least max(1, n).
For real flavors:
The scalars beta defines the eigenvalues of GNEP.
Together, the quantities alpha = (alphar(j), alphai(j)) and beta = beta(j) represents the j-th eigenvalue of the matrix pair (A,B), in one of the forms lambda = alpha/beta or mu = beta/alpha. In general, because either lambda or mu may overflow, they should not be computed.
For complex flavors:
The real non-negative scalars beta defines the eigenvalues of GNEP. Together, the quantities alpha = alpha(j) and beta = beta(j) represent the j-th eigenvalue of the matrix pair (A,B), in one of the forms lambda = alpha/beta or mu = beta/alpha. In general, because either lambda or mu may overflow, they should not be computed.
- q
-
On exit, if wantq = 'I', q is overwritten by the orthogonal/unitary matrix of left Schur vectors of the pair (A,B), and if wantq = 'V', q is overwritten by the orthogonal/unitary matrix of left Schur vectors of (A1, B1).
- z
-
On exit, if wantz = 'I', z is overwritten by the orthogonal/unitary matrix of right Schur vectors of the pair (A, B), and if wantz = 'V', z is overwritten by the orthogonal/unitary matrix of right Schur vectors of (A1, B1).
work(1)
If info ≥ 0, on exit work(1) contains the minimum value of lwork required for optimum performance. Use this lwork for subsequent runs.
- info
-
INTEGER.
If info = 0, the execution is successful.
If info = -i, the i-th parameter had an illegal value.
If info = 1,..., n, the QZ iteration did not converge.
(A,B) is not in Schur form, but alphar(i), alphai(i) (for real flavors), alpha(i) (for complex flavors), and beta(i), i=info+1,..., n should be correct.
If you are in doubt how much workspace to supply, use a generous value of lwork for the first run or set lwork = -1.
If you choose the first option and set any of the admissible lwork sizes no less than the minimal value described, the routine completes the task, though probably not so fast as with a recommended workspace, and provides the recommended workspace in the first element of the corresponding array work on exit. Use this value of work(1) for subsequent runs.
If you set lwork = -1, the routine returns immediately and provides the recommended workspace in the first element of the corresponding array work. This operation is called a workspace query.
Note that if you set lwork to less than the minimal required value and not -1, the routine returns immediately with an error exit and does not provide any information on the recommended workspace.