dhgeqz.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 986 行 · 第 1/5 页
HTML
986 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dhgeqz.f</title>
<meta name="generator" content="emacs 21.3.1; htmlfontify 0.20">
<style type="text/css"><!--
body { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.default { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.default a { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: underline; }
span.string { color: rgb(188, 143, 143); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.string a { color: rgb(188, 143, 143); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: underline; }
span.comment { color: rgb(178, 34, 34); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: none; }
span.comment a { color: rgb(178, 34, 34); background: rgb(255, 255, 255); font-style: normal; font-weight: 500; font-stretch: normal; font-family: adobe-courier; font-size: 11pt; text-decoration: underline; }
--></style>
</head>
<body>
<pre>
SUBROUTINE <a name="DHGEQZ.1"></a><a href="dhgeqz.f.html#DHGEQZ.1">DHGEQZ</a>( JOB, COMPQ, COMPZ, N, ILO, IHI, H, LDH, T, LDT,
$ ALPHAR, ALPHAI, BETA, Q, LDQ, Z, LDZ, WORK,
$ LWORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK routine (version 3.1) --
</span><span class="comment">*</span><span class="comment"> Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
</span><span class="comment">*</span><span class="comment"> November 2006
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> .. Scalar Arguments ..
</span> CHARACTER COMPQ, COMPZ, JOB
INTEGER IHI, ILO, INFO, LDH, LDQ, LDT, LDZ, LWORK, N
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> DOUBLE PRECISION ALPHAI( * ), ALPHAR( * ), BETA( * ),
$ H( LDH, * ), Q( LDQ, * ), T( LDT, * ),
$ WORK( * ), Z( LDZ, * )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Purpose
</span><span class="comment">*</span><span class="comment"> =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> <a name="DHGEQZ.22"></a><a href="dhgeqz.f.html#DHGEQZ.1">DHGEQZ</a> computes the eigenvalues of a real matrix pair (H,T),
</span><span class="comment">*</span><span class="comment"> where H is an upper Hessenberg matrix and T is upper triangular,
</span><span class="comment">*</span><span class="comment"> using the double-shift QZ method.
</span><span class="comment">*</span><span class="comment"> Matrix pairs of this type are produced by the reduction to
</span><span class="comment">*</span><span class="comment"> generalized upper Hessenberg form of a real matrix pair (A,B):
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A = Q1*H*Z1**T, B = Q1*T*Z1**T,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> as computed by <a name="DGGHRD.30"></a><a href="dgghrd.f.html#DGGHRD.1">DGGHRD</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If JOB='S', then the Hessenberg-triangular pair (H,T) is
</span><span class="comment">*</span><span class="comment"> also reduced to generalized Schur form,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> H = Q*S*Z**T, T = Q*P*Z**T,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> where Q and Z are orthogonal matrices, P is an upper triangular
</span><span class="comment">*</span><span class="comment"> matrix, and S is a quasi-triangular matrix with 1-by-1 and 2-by-2
</span><span class="comment">*</span><span class="comment"> diagonal blocks.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The 1-by-1 blocks correspond to real eigenvalues of the matrix pair
</span><span class="comment">*</span><span class="comment"> (H,T) and the 2-by-2 blocks correspond to complex conjugate pairs of
</span><span class="comment">*</span><span class="comment"> eigenvalues.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Additionally, the 2-by-2 upper triangular diagonal blocks of P
</span><span class="comment">*</span><span class="comment"> corresponding to 2-by-2 blocks of S are reduced to positive diagonal
</span><span class="comment">*</span><span class="comment"> form, i.e., if S(j+1,j) is non-zero, then P(j+1,j) = P(j,j+1) = 0,
</span><span class="comment">*</span><span class="comment"> P(j,j) > 0, and P(j+1,j+1) > 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Optionally, the orthogonal matrix Q from the generalized Schur
</span><span class="comment">*</span><span class="comment"> factorization may be postmultiplied into an input matrix Q1, and the
</span><span class="comment">*</span><span class="comment"> orthogonal matrix Z may be postmultiplied into an input matrix Z1.
</span><span class="comment">*</span><span class="comment"> If Q1 and Z1 are the orthogonal matrices from <a name="DGGHRD.53"></a><a href="dgghrd.f.html#DGGHRD.1">DGGHRD</a> that reduced
</span><span class="comment">*</span><span class="comment"> the matrix pair (A,B) to generalized upper Hessenberg form, then the
</span><span class="comment">*</span><span class="comment"> output matrices Q1*Q and Z1*Z are the orthogonal factors from the
</span><span class="comment">*</span><span class="comment"> generalized Schur factorization of (A,B):
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A = (Q1*Q)*S*(Z1*Z)**T, B = (Q1*Q)*P*(Z1*Z)**T.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> To avoid overflow, eigenvalues of the matrix pair (H,T) (equivalently,
</span><span class="comment">*</span><span class="comment"> of (A,B)) are computed as a pair of values (alpha,beta), where alpha is
</span><span class="comment">*</span><span class="comment"> complex and beta real.
</span><span class="comment">*</span><span class="comment"> If beta is nonzero, lambda = alpha / beta is an eigenvalue of the
</span><span class="comment">*</span><span class="comment"> generalized nonsymmetric eigenvalue problem (GNEP)
</span><span class="comment">*</span><span class="comment"> A*x = lambda*B*x
</span><span class="comment">*</span><span class="comment"> and if alpha is nonzero, mu = beta / alpha is an eigenvalue of the
</span><span class="comment">*</span><span class="comment"> alternate form of the GNEP
</span><span class="comment">*</span><span class="comment"> mu*A*y = B*y.
</span><span class="comment">*</span><span class="comment"> Real eigenvalues can be read directly from the generalized Schur
</span><span class="comment">*</span><span class="comment"> form:
</span><span class="comment">*</span><span class="comment"> alpha = S(i,i), beta = P(i,i).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Ref: C.B. Moler & G.W. Stewart, "An Algorithm for Generalized Matrix
</span><span class="comment">*</span><span class="comment"> Eigenvalue Problems", SIAM J. Numer. Anal., 10(1973),
</span><span class="comment">*</span><span class="comment"> pp. 241--256.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Arguments
</span><span class="comment">*</span><span class="comment"> =========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> JOB (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'E': Compute eigenvalues only;
</span><span class="comment">*</span><span class="comment"> = 'S': Compute eigenvalues and the Schur form.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> COMPQ (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': Left Schur vectors (Q) are not computed;
</span><span class="comment">*</span><span class="comment"> = 'I': Q is initialized to the unit matrix and the matrix Q
</span><span class="comment">*</span><span class="comment"> of left Schur vectors of (H,T) is returned;
</span><span class="comment">*</span><span class="comment"> = 'V': Q must contain an orthogonal matrix Q1 on entry and
</span><span class="comment">*</span><span class="comment"> the product Q1*Q is returned.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> COMPZ (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': Right Schur vectors (Z) are not computed;
</span><span class="comment">*</span><span class="comment"> = 'I': Z is initialized to the unit matrix and the matrix Z
</span><span class="comment">*</span><span class="comment"> of right Schur vectors of (H,T) is returned;
</span><span class="comment">*</span><span class="comment"> = 'V': Z must contain an orthogonal matrix Z1 on entry and
</span><span class="comment">*</span><span class="comment"> the product Z1*Z is returned.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> N (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The order of the matrices H, T, Q, and Z. N >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ILO (input) INTEGER
</span><span class="comment">*</span><span class="comment"> IHI (input) INTEGER
</span><span class="comment">*</span><span class="comment"> ILO and IHI mark the rows and columns of H which are in
</span><span class="comment">*</span><span class="comment"> Hessenberg form. It is assumed that A is already upper
</span><span class="comment">*</span><span class="comment"> triangular in rows and columns 1:ILO-1 and IHI+1:N.
</span><span class="comment">*</span><span class="comment"> If N > 0, 1 <= ILO <= IHI <= N; if N = 0, ILO=1 and IHI=0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> H (input/output) DOUBLE PRECISION array, dimension (LDH, N)
</span><span class="comment">*</span><span class="comment"> On entry, the N-by-N upper Hessenberg matrix H.
</span><span class="comment">*</span><span class="comment"> On exit, if JOB = 'S', H contains the upper quasi-triangular
</span><span class="comment">*</span><span class="comment"> matrix S from the generalized Schur factorization;
</span><span class="comment">*</span><span class="comment"> 2-by-2 diagonal blocks (corresponding to complex conjugate
</span><span class="comment">*</span><span class="comment"> pairs of eigenvalues) are returned in standard form, with
</span><span class="comment">*</span><span class="comment"> H(i,i) = H(i+1,i+1) and H(i+1,i)*H(i,i+1) < 0.
</span><span class="comment">*</span><span class="comment"> If JOB = 'E', the diagonal blocks of H match those of S, but
</span><span class="comment">*</span><span class="comment"> the rest of H is unspecified.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDH (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array H. LDH >= max( 1, N ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> T (input/output) DOUBLE PRECISION array, dimension (LDT, N)
</span><span class="comment">*</span><span class="comment"> On entry, the N-by-N upper triangular matrix T.
</span><span class="comment">*</span><span class="comment"> On exit, if JOB = 'S', T contains the upper triangular
</span><span class="comment">*</span><span class="comment"> matrix P from the generalized Schur factorization;
</span><span class="comment">*</span><span class="comment"> 2-by-2 diagonal blocks of P corresponding to 2-by-2 blocks of S
</span><span class="comment">*</span><span class="comment"> are reduced to positive diagonal form, i.e., if H(j+1,j) is
</span><span class="comment">*</span><span class="comment"> non-zero, then T(j+1,j) = T(j,j+1) = 0, T(j,j) > 0, and
</span><span class="comment">*</span><span class="comment"> T(j+1,j+1) > 0.
</span><span class="comment">*</span><span class="comment"> If JOB = 'E', the diagonal blocks of T match those of P, but
</span><span class="comment">*</span><span class="comment"> the rest of T is unspecified.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDT (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array T. LDT >= max( 1, N ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ALPHAR (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The real parts of each scalar alpha defining an eigenvalue
</span><span class="comment">*</span><span class="comment"> of GNEP.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ALPHAI (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The imaginary parts of each scalar alpha defining an
</span><span class="comment">*</span><span class="comment"> eigenvalue of GNEP.
</span><span class="comment">*</span><span class="comment"> If ALPHAI(j) is zero, then the j-th eigenvalue is real; if
</span><span class="comment">*</span><span class="comment"> positive, then the j-th and (j+1)-st eigenvalues are a
</span><span class="comment">*</span><span class="comment"> complex conjugate pair, with ALPHAI(j+1) = -ALPHAI(j).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> BETA (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The scalars beta that define the eigenvalues of GNEP.
</span><span class="comment">*</span><span class="comment"> Together, the quantities alpha = (ALPHAR(j),ALPHAI(j)) and
</span><span class="comment">*</span><span class="comment"> beta = BETA(j) represent the j-th eigenvalue of the matrix
</span><span class="comment">*</span><span class="comment"> pair (A,B), in one of the forms lambda = alpha/beta or
</span><span class="comment">*</span><span class="comment"> mu = beta/alpha. Since either lambda or mu may overflow,
</span><span class="comment">*</span><span class="comment"> they should not, in general, be computed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Q (input/output) DOUBLE PRECISION array, dimension (LDQ, N)
</span><span class="comment">*</span><span class="comment"> On entry, if COMPZ = 'V', the orthogonal matrix Q1 used in
</span><span class="comment">*</span><span class="comment"> the reduction of (A,B) to generalized Hessenberg form.
</span><span class="comment">*</span><span class="comment"> On exit, if COMPZ = 'I', the orthogonal matrix of left Schur
</span><span class="comment">*</span><span class="comment"> vectors of (H,T), and if COMPZ = 'V', the orthogonal matrix
</span><span class="comment">*</span><span class="comment"> of left Schur vectors of (A,B).
</span><span class="comment">*</span><span class="comment"> Not referenced if COMPZ = 'N'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDQ (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array Q. LDQ >= 1.
</span><span class="comment">*</span><span class="comment"> If COMPQ='V' or 'I', then LDQ >= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z (input/output) DOUBLE PRECISION array, dimension (LDZ, N)
</span><span class="comment">*</span><span class="comment"> On entry, if COMPZ = 'V', the orthogonal matrix Z1 used in
</span><span class="comment">*</span><span class="comment"> the reduction of (A,B) to generalized Hessenberg form.
</span><span class="comment">*</span><span class="comment"> On exit, if COMPZ = 'I', the orthogonal matrix of
</span><span class="comment">*</span><span class="comment"> right Schur vectors of (H,T), and if COMPZ = 'V', the
</span><span class="comment">*</span><span class="comment"> orthogonal matrix of right Schur vectors of (A,B).
</span><span class="comment">*</span><span class="comment"> Not referenced if COMPZ = 'N'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDZ (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array Z. LDZ >= 1.
</span><span class="comment">*</span><span class="comment"> If COMPZ='V' or 'I', then LDZ >= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
</span><span class="comment">*</span><span class="comment"> On exit, if INFO >= 0, WORK(1) returns the optimal LWORK.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?