dgegv.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 690 行 · 第 1/4 页
HTML
690 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dgegv.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="DGEGV.1"></a><a href="dgegv.f.html#DGEGV.1">DGEGV</a>( JOBVL, JOBVR, N, A, LDA, B, LDB, ALPHAR, ALPHAI,
$ BETA, VL, LDVL, VR, LDVR, WORK, LWORK, 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> DOUBLE PRECISION A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
$ 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"> This routine is deprecated and has been replaced by routine <a name="DGGEV.21"></a><a href="dggev.f.html#DGGEV.1">DGGEV</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> <a name="DGEGV.23"></a><a href="dgegv.f.html#DGEGV.1">DGEGV</a> computes the eigenvalues and, optionally, the left and/or right
</span><span class="comment">*</span><span class="comment"> eigenvectors of a real matrix pair (A,B).
</span><span class="comment">*</span><span class="comment"> Given two square matrices A and B,
</span><span class="comment">*</span><span class="comment"> the generalized nonsymmetric eigenvalue problem (GNEP) is to find the
</span><span class="comment">*</span><span class="comment"> eigenvalues lambda and corresponding (non-zero) eigenvectors x such
</span><span class="comment">*</span><span class="comment"> that
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A*x = lambda*B*x.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> An alternate form is to find the eigenvalues mu and corresponding
</span><span class="comment">*</span><span class="comment"> eigenvectors y such that
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> mu*A*y = B*y.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> These two forms are equivalent with mu = 1/lambda and x = y if
</span><span class="comment">*</span><span class="comment"> neither lambda nor mu is zero. In order to deal with the case that
</span><span class="comment">*</span><span class="comment"> lambda or mu is zero or small, two values alpha and beta are returned
</span><span class="comment">*</span><span class="comment"> for each eigenvalue, such that lambda = alpha/beta and
</span><span class="comment">*</span><span class="comment"> mu = beta/alpha.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The vectors x and y in the above equations are right eigenvectors of
</span><span class="comment">*</span><span class="comment"> the matrix pair (A,B). Vectors u and v satisfying
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> u**H*A = lambda*u**H*B or mu*v**H*A = v**H*B
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> are left eigenvectors of (A,B).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Note: this routine performs "full balancing" on A and B -- see
</span><span class="comment">*</span><span class="comment"> "Further Details", below.
</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 (returned
</span><span class="comment">*</span><span class="comment"> in VL).
</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 (returned
</span><span class="comment">*</span><span class="comment"> in VR).
</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) DOUBLE PRECISION array, dimension (LDA, N)
</span><span class="comment">*</span><span class="comment"> On entry, the matrix A.
</span><span class="comment">*</span><span class="comment"> If JOBVL = 'V' or JOBVR = 'V', then on exit A
</span><span class="comment">*</span><span class="comment"> contains the real Schur form of A from the generalized Schur
</span><span class="comment">*</span><span class="comment"> factorization of the pair (A,B) after balancing.
</span><span class="comment">*</span><span class="comment"> If no eigenvectors were computed, then only the diagonal
</span><span class="comment">*</span><span class="comment"> blocks from the Schur form will be correct. See <a name="DGGHRD.75"></a><a href="dgghrd.f.html#DGGHRD.1">DGGHRD</a> and
</span><span class="comment">*</span><span class="comment"> <a name="DHGEQZ.76"></a><a href="dhgeqz.f.html#DHGEQZ.1">DHGEQZ</a> for details.
</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) DOUBLE PRECISION array, dimension (LDB, N)
</span><span class="comment">*</span><span class="comment"> On entry, the matrix B.
</span><span class="comment">*</span><span class="comment"> If JOBVL = 'V' or JOBVR = 'V', then on exit B contains the
</span><span class="comment">*</span><span class="comment"> upper triangular matrix obtained from B in the generalized
</span><span class="comment">*</span><span class="comment"> Schur factorization of the pair (A,B) after balancing.
</span><span class="comment">*</span><span class="comment"> If no eigenvectors were computed, then only those elements of
</span><span class="comment">*</span><span class="comment"> B corresponding to the diagonal blocks from the Schur form of
</span><span class="comment">*</span><span class="comment"> A will be correct. See <a name="DGGHRD.88"></a><a href="dgghrd.f.html#DGGHRD.1">DGGHRD</a> and <a name="DHGEQZ.88"></a><a href="dhgeqz.f.html#DHGEQZ.1">DHGEQZ</a> for details.
</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"> 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 of
</span><span class="comment">*</span><span class="comment"> 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. If ALPHAI(j) is zero, then the j-th
</span><span class="comment">*</span><span class="comment"> eigenvalue is real; if positive, then the j-th and
</span><span class="comment">*</span><span class="comment"> (j+1)-st eigenvalues are a complex conjugate pair, with
</span><span class="comment">*</span><span class="comment"> 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">
</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"> VL (output) DOUBLE PRECISION array, dimension (LDVL,N)
</span><span class="comment">*</span><span class="comment"> If JOBVL = 'V', the left eigenvectors u(j) are stored
</span><span class="comment">*</span><span class="comment"> in the columns of VL, in the same order as their eigenvalues.
</span><span class="comment">*</span><span class="comment"> If the j-th eigenvalue is real, then u(j) = VL(:,j).
</span><span class="comment">*</span><span class="comment"> If the j-th and (j+1)-st eigenvalues form a complex conjugate
</span><span class="comment">*</span><span class="comment"> pair, then
</span><span class="comment">*</span><span class="comment"> u(j) = VL(:,j) + i*VL(:,j+1)
</span><span class="comment">*</span><span class="comment"> and
</span><span class="comment">*</span><span class="comment"> u(j+1) = VL(:,j) - i*VL(:,j+1).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Each eigenvector is scaled so that its largest component has
</span><span class="comment">*</span><span class="comment"> abs(real part) + abs(imag. part) = 1, except for eigenvectors
</span><span class="comment">*</span><span class="comment"> corresponding to an eigenvalue with alpha = beta = 0, which
</span><span class="comment">*</span><span class="comment"> are set to zero.
</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) DOUBLE PRECISION array, dimension (LDVR,N)
</span><span class="comment">*</span><span class="comment"> If JOBVR = 'V', the right eigenvectors x(j) are stored
</span><span class="comment">*</span><span class="comment"> in the columns of VR, in the same order as their eigenvalues.
</span><span class="comment">*</span><span class="comment"> If the j-th eigenvalue is real, then x(j) = VR(:,j).
</span><span class="comment">*</span><span class="comment"> If the j-th and (j+1)-st eigenvalues form a complex conjugate
</span><span class="comment">*</span><span class="comment"> pair, then
</span><span class="comment">*</span><span class="comment"> x(j) = VR(:,j) + i*VR(:,j+1)
</span><span class="comment">*</span><span class="comment"> and
</span><span class="comment">*</span><span class="comment"> x(j+1) = VR(:,j) - i*VR(:,j+1).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Each eigenvector is scaled so that its largest component has
</span><span class="comment">*</span><span class="comment"> abs(real part) + abs(imag. part) = 1, except for eigenvalues
</span><span class="comment">*</span><span class="comment"> corresponding to an eigenvalue with alpha = beta = 0, which
</span><span class="comment">*</span><span class="comment"> are set to zero.
</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) 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 + -
显示快捷键?