cggev.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 479 行 · 第 1/3 页
HTML
479 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>cggev.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="CGGEV.1"></a><a href="cggev.f.html#CGGEV.1">CGGEV</a>( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHA, BETA,
$ VL, LDVL, VR, LDVR, WORK, LWORK, RWORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK driver 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 JOBVL, JOBVR
INTEGER INFO, LDA, LDB, LDVL, LDVR, LWORK, N
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> REAL RWORK( * )
COMPLEX A( LDA, * ), ALPHA( * ), B( LDB, * ),
$ BETA( * ), VL( LDVL, * ), VR( LDVR, * ),
$ WORK( * )
<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="CGGEV.22"></a><a href="cggev.f.html#CGGEV.1">CGGEV</a> computes for a pair of N-by-N complex nonsymmetric matrices
</span><span class="comment">*</span><span class="comment"> (A,B), the generalized eigenvalues, and optionally, the left and/or
</span><span class="comment">*</span><span class="comment"> right generalized eigenvectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A generalized eigenvalue for a pair of matrices (A,B) is a scalar
</span><span class="comment">*</span><span class="comment"> lambda or a ratio alpha/beta = lambda, such that A - lambda*B is
</span><span class="comment">*</span><span class="comment"> singular. It is usually represented as the pair (alpha,beta), as
</span><span class="comment">*</span><span class="comment"> there is a reasonable interpretation for beta=0, and even for both
</span><span class="comment">*</span><span class="comment"> being zero.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The right generalized eigenvector v(j) corresponding to the
</span><span class="comment">*</span><span class="comment"> generalized eigenvalue lambda(j) of (A,B) satisfies
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A * v(j) = lambda(j) * B * v(j).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The left generalized eigenvector u(j) corresponding to the
</span><span class="comment">*</span><span class="comment"> generalized eigenvalues lambda(j) of (A,B) satisfies
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> u(j)**H * A = lambda(j) * u(j)**H * B
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> where u(j)**H is the conjugate-transpose of u(j).
</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"> JOBVL (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': do not compute the left generalized eigenvectors;
</span><span class="comment">*</span><span class="comment"> = 'V': compute the left generalized eigenvectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> JOBVR (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': do not compute the right generalized eigenvectors;
</span><span class="comment">*</span><span class="comment"> = 'V': compute the right generalized eigenvectors.
</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 A, B, VL, and VR. N >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A (input/output) COMPLEX array, dimension (LDA, N)
</span><span class="comment">*</span><span class="comment"> On entry, the matrix A in the pair (A,B).
</span><span class="comment">*</span><span class="comment"> On exit, A has been overwritten.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDA (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of A. LDA >= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> B (input/output) COMPLEX array, dimension (LDB, N)
</span><span class="comment">*</span><span class="comment"> On entry, the matrix B in the pair (A,B).
</span><span class="comment">*</span><span class="comment"> On exit, B has been overwritten.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDB (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of B. LDB >= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ALPHA (output) COMPLEX array, dimension (N)
</span><span class="comment">*</span><span class="comment"> BETA (output) COMPLEX array, dimension (N)
</span><span class="comment">*</span><span class="comment"> On exit, ALPHA(j)/BETA(j), j=1,...,N, will be the
</span><span class="comment">*</span><span class="comment"> generalized eigenvalues.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Note: the quotients ALPHA(j)/BETA(j) may easily over- or
</span><span class="comment">*</span><span class="comment"> underflow, and BETA(j) may even be zero. Thus, the user
</span><span class="comment">*</span><span class="comment"> should avoid naively computing the ratio alpha/beta.
</span><span class="comment">*</span><span class="comment"> However, ALPHA will be always less than and usually
</span><span class="comment">*</span><span class="comment"> comparable with norm(A) in magnitude, and BETA always less
</span><span class="comment">*</span><span class="comment"> than and usually comparable with norm(B).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VL (output) COMPLEX array, dimension (LDVL,N)
</span><span class="comment">*</span><span class="comment"> If JOBVL = 'V', the left generalized eigenvectors u(j) are
</span><span class="comment">*</span><span class="comment"> stored one after another in the columns of VL, in the same
</span><span class="comment">*</span><span class="comment"> order as their eigenvalues.
</span><span class="comment">*</span><span class="comment"> Each eigenvector is scaled so the largest component has
</span><span class="comment">*</span><span class="comment"> abs(real part) + abs(imag. part) = 1.
</span><span class="comment">*</span><span class="comment"> Not referenced if JOBVL = 'N'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDVL (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the matrix VL. LDVL >= 1, and
</span><span class="comment">*</span><span class="comment"> if JOBVL = 'V', LDVL >= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VR (output) COMPLEX array, dimension (LDVR,N)
</span><span class="comment">*</span><span class="comment"> If JOBVR = 'V', the right generalized eigenvectors v(j) are
</span><span class="comment">*</span><span class="comment"> stored one after another in the columns of VR, in the same
</span><span class="comment">*</span><span class="comment"> order as their eigenvalues.
</span><span class="comment">*</span><span class="comment"> Each eigenvector is scaled so the largest component has
</span><span class="comment">*</span><span class="comment"> abs(real part) + abs(imag. part) = 1.
</span><span class="comment">*</span><span class="comment"> Not referenced if JOBVR = 'N'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDVR (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the matrix VR. LDVR >= 1, and
</span><span class="comment">*</span><span class="comment"> if JOBVR = 'V', LDVR >= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
</span><span class="comment">*</span><span class="comment"> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LWORK (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The dimension of the array WORK. LWORK >= max(1,2*N).
</span><span class="comment">*</span><span class="comment"> For good performance, LWORK must generally be larger.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If LWORK = -1, then a workspace query is assumed; the routine
</span><span class="comment">*</span><span class="comment"> only calculates the optimal size of the WORK array, returns
</span><span class="comment">*</span><span class="comment"> this value as the first entry of the WORK array, and no error
</span><span class="comment">*</span><span class="comment"> message related to LWORK is issued by <a name="XERBLA.118"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RWORK (workspace/output) REAL array, dimension (8*N)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> INFO (output) INTEGER
</span><span class="comment">*</span><span class="comment"> = 0: successful exit
</span><span class="comment">*</span><span class="comment"> < 0: if INFO = -i, the i-th argument had an illegal value.
</span><span class="comment">*</span><span class="comment"> =1,...,N:
</span><span class="comment">*</span><span class="comment"> The QZ iteration failed. No eigenvectors have been
</span><span class="comment">*</span><span class="comment"> calculated, but ALPHA(j) and BETA(j) should be
</span><span class="comment">*</span><span class="comment"> correct for j=INFO+1,...,N.
</span><span class="comment">*</span><span class="comment"> > N: =N+1: other then QZ iteration failed in <a name="SHGEQZ.129"></a><a href="shgeqz.f.html#SHGEQZ.1">SHGEQZ</a>,
</span><span class="comment">*</span><span class="comment"> =N+2: error return from <a name="STGEVC.130"></a><a href="stgevc.f.html#STGEVC.1">STGEVC</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> =====================================================================
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> .. Parameters ..
</span> REAL ZERO, ONE
PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )
COMPLEX CZERO, CONE
PARAMETER ( CZERO = ( 0.0E0, 0.0E0 ),
$ CONE = ( 1.0E0, 0.0E0 ) )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Local Scalars ..
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?