dgees.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 459 行 · 第 1/3 页
HTML
459 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dgees.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="DGEES.1"></a><a href="dgees.f.html#DGEES.1">DGEES</a>( JOBVS, SORT, SELECT, N, A, LDA, SDIM, WR, WI,
$ VS, LDVS, WORK, LWORK, BWORK, 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 JOBVS, SORT
INTEGER INFO, LDA, LDVS, LWORK, N, SDIM
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> LOGICAL BWORK( * )
DOUBLE PRECISION A( LDA, * ), VS( LDVS, * ), WI( * ), WORK( * ),
$ WR( * )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Function Arguments ..
</span> LOGICAL SELECT
EXTERNAL SELECT
<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="DGEES.25"></a><a href="dgees.f.html#DGEES.1">DGEES</a> computes for an N-by-N real nonsymmetric matrix A, the
</span><span class="comment">*</span><span class="comment"> eigenvalues, the real Schur form T, and, optionally, the matrix of
</span><span class="comment">*</span><span class="comment"> Schur vectors Z. This gives the Schur factorization A = Z*T*(Z**T).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Optionally, it also orders the eigenvalues on the diagonal of the
</span><span class="comment">*</span><span class="comment"> real Schur form so that selected eigenvalues are at the top left.
</span><span class="comment">*</span><span class="comment"> The leading columns of Z then form an orthonormal basis for the
</span><span class="comment">*</span><span class="comment"> invariant subspace corresponding to the selected eigenvalues.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A matrix is in real Schur form if it is upper quasi-triangular with
</span><span class="comment">*</span><span class="comment"> 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in the
</span><span class="comment">*</span><span class="comment"> form
</span><span class="comment">*</span><span class="comment"> [ a b ]
</span><span class="comment">*</span><span class="comment"> [ c a ]
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> where b*c < 0. The eigenvalues of such a block are a +- sqrt(bc).
</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"> JOBVS (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': Schur vectors are not computed;
</span><span class="comment">*</span><span class="comment"> = 'V': Schur vectors are computed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SORT (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> Specifies whether or not to order the eigenvalues on the
</span><span class="comment">*</span><span class="comment"> diagonal of the Schur form.
</span><span class="comment">*</span><span class="comment"> = 'N': Eigenvalues are not ordered;
</span><span class="comment">*</span><span class="comment"> = 'S': Eigenvalues are ordered (see SELECT).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SELECT (external procedure) LOGICAL FUNCTION of two DOUBLE PRECISION arguments
</span><span class="comment">*</span><span class="comment"> SELECT must be declared EXTERNAL in the calling subroutine.
</span><span class="comment">*</span><span class="comment"> If SORT = 'S', SELECT is used to select eigenvalues to sort
</span><span class="comment">*</span><span class="comment"> to the top left of the Schur form.
</span><span class="comment">*</span><span class="comment"> If SORT = 'N', SELECT is not referenced.
</span><span class="comment">*</span><span class="comment"> An eigenvalue WR(j)+sqrt(-1)*WI(j) is selected if
</span><span class="comment">*</span><span class="comment"> SELECT(WR(j),WI(j)) is true; i.e., if either one of a complex
</span><span class="comment">*</span><span class="comment"> conjugate pair of eigenvalues is selected, then both complex
</span><span class="comment">*</span><span class="comment"> eigenvalues are selected.
</span><span class="comment">*</span><span class="comment"> Note that a selected complex eigenvalue may no longer
</span><span class="comment">*</span><span class="comment"> satisfy SELECT(WR(j),WI(j)) = .TRUE. after ordering, since
</span><span class="comment">*</span><span class="comment"> ordering may change the value of complex eigenvalues
</span><span class="comment">*</span><span class="comment"> (especially if the eigenvalue is ill-conditioned); in this
</span><span class="comment">*</span><span class="comment"> case INFO is set to N+2 (see INFO below).
</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 matrix A. 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 N-by-N matrix A.
</span><span class="comment">*</span><span class="comment"> On exit, A has been overwritten by its real Schur form T.
</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 the array A. LDA >= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SDIM (output) INTEGER
</span><span class="comment">*</span><span class="comment"> If SORT = 'N', SDIM = 0.
</span><span class="comment">*</span><span class="comment"> If SORT = 'S', SDIM = number of eigenvalues (after sorting)
</span><span class="comment">*</span><span class="comment"> for which SELECT is true. (Complex conjugate
</span><span class="comment">*</span><span class="comment"> pairs for which SELECT is true for either
</span><span class="comment">*</span><span class="comment"> eigenvalue count as 2.)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WR (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> WI (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> WR and WI contain the real and imaginary parts,
</span><span class="comment">*</span><span class="comment"> respectively, of the computed eigenvalues in the same order
</span><span class="comment">*</span><span class="comment"> that they appear on the diagonal of the output Schur form T.
</span><span class="comment">*</span><span class="comment"> Complex conjugate pairs of eigenvalues will appear
</span><span class="comment">*</span><span class="comment"> consecutively with the eigenvalue having the positive
</span><span class="comment">*</span><span class="comment"> imaginary part first.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VS (output) DOUBLE PRECISION array, dimension (LDVS,N)
</span><span class="comment">*</span><span class="comment"> If JOBVS = 'V', VS contains the orthogonal matrix Z of Schur
</span><span class="comment">*</span><span class="comment"> vectors.
</span><span class="comment">*</span><span class="comment"> If JOBVS = 'N', VS is not referenced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDVS (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array VS. LDVS >= 1; if
</span><span class="comment">*</span><span class="comment"> JOBVS = 'V', LDVS >= 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) contains 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,3*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.115"></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"> BWORK (workspace) LOGICAL array, dimension (N)
</span><span class="comment">*</span><span class="comment"> Not referenced if SORT = '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"> > 0: if INFO = i, and i is
</span><span class="comment">*</span><span class="comment"> <= N: the QR algorithm failed to compute all the
</span><span class="comment">*</span><span class="comment"> eigenvalues; elements 1:ILO-1 and i+1:N of WR and WI
</span><span class="comment">*</span><span class="comment"> contain those eigenvalues which have converged; if
</span><span class="comment">*</span><span class="comment"> JOBVS = 'V', VS contains the matrix which reduces A
</span><span class="comment">*</span><span class="comment"> to its partially converged Schur form.
</span><span class="comment">*</span><span class="comment"> = N+1: the eigenvalues could not be reordered because some
</span><span class="comment">*</span><span class="comment"> eigenvalues were too close to separate (the problem
</span><span class="comment">*</span><span class="comment"> is very ill-conditioned);
</span><span class="comment">*</span><span class="comment"> = N+2: after reordering, roundoff changed values of some
</span><span class="comment">*</span><span class="comment"> complex eigenvalues so that leading eigenvalues in
</span><span class="comment">*</span><span class="comment"> the Schur form no longer satisfy SELECT=.TRUE. This
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?