cgeevx.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 557 行 · 第 1/3 页
HTML
557 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>cgeevx.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="CGEEVX.1"></a><a href="cgeevx.f.html#CGEEVX.1">CGEEVX</a>( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, W, VL,
$ LDVL, VR, LDVR, ILO, IHI, SCALE, ABNRM, RCONDE,
$ RCONDV, 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 BALANC, JOBVL, JOBVR, SENSE
INTEGER IHI, ILO, INFO, LDA, LDVL, LDVR, LWORK, N
REAL ABNRM
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> REAL RCONDE( * ), RCONDV( * ), RWORK( * ),
$ SCALE( * )
COMPLEX A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
$ W( * ), 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="CGEEVX.24"></a><a href="cgeevx.f.html#CGEEVX.1">CGEEVX</a> computes for an N-by-N complex nonsymmetric matrix A, the
</span><span class="comment">*</span><span class="comment"> eigenvalues and, optionally, the left and/or right eigenvectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Optionally also, it computes a balancing transformation to improve
</span><span class="comment">*</span><span class="comment"> the conditioning of the eigenvalues and eigenvectors (ILO, IHI,
</span><span class="comment">*</span><span class="comment"> SCALE, and ABNRM), reciprocal condition numbers for the eigenvalues
</span><span class="comment">*</span><span class="comment"> (RCONDE), and reciprocal condition numbers for the right
</span><span class="comment">*</span><span class="comment"> eigenvectors (RCONDV).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The right eigenvector v(j) of A satisfies
</span><span class="comment">*</span><span class="comment"> A * v(j) = lambda(j) * v(j)
</span><span class="comment">*</span><span class="comment"> where lambda(j) is its eigenvalue.
</span><span class="comment">*</span><span class="comment"> The left eigenvector u(j) of A satisfies
</span><span class="comment">*</span><span class="comment"> u(j)**H * A = lambda(j) * u(j)**H
</span><span class="comment">*</span><span class="comment"> where u(j)**H denotes the conjugate transpose of u(j).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The computed eigenvectors are normalized to have Euclidean norm
</span><span class="comment">*</span><span class="comment"> equal to 1 and largest component real.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Balancing a matrix means permuting the rows and columns to make it
</span><span class="comment">*</span><span class="comment"> more nearly upper triangular, and applying a diagonal similarity
</span><span class="comment">*</span><span class="comment"> transformation D * A * D**(-1), where D is a diagonal matrix, to
</span><span class="comment">*</span><span class="comment"> make its rows and columns closer in norm and the condition numbers
</span><span class="comment">*</span><span class="comment"> of its eigenvalues and eigenvectors smaller. The computed
</span><span class="comment">*</span><span class="comment"> reciprocal condition numbers correspond to the balanced matrix.
</span><span class="comment">*</span><span class="comment"> Permuting rows and columns will not change the condition numbers
</span><span class="comment">*</span><span class="comment"> (in exact arithmetic) but diagonal scaling will. For further
</span><span class="comment">*</span><span class="comment"> explanation of balancing, see section 4.10.2 of the LAPACK
</span><span class="comment">*</span><span class="comment"> Users' Guide.
</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"> BALANC (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> Indicates how the input matrix should be diagonally scaled
</span><span class="comment">*</span><span class="comment"> and/or permuted to improve the conditioning of its
</span><span class="comment">*</span><span class="comment"> eigenvalues.
</span><span class="comment">*</span><span class="comment"> = 'N': Do not diagonally scale or permute;
</span><span class="comment">*</span><span class="comment"> = 'P': Perform permutations to make the matrix more nearly
</span><span class="comment">*</span><span class="comment"> upper triangular. Do not diagonally scale;
</span><span class="comment">*</span><span class="comment"> = 'S': Diagonally scale the matrix, ie. replace A by
</span><span class="comment">*</span><span class="comment"> D*A*D**(-1), where D is a diagonal matrix chosen
</span><span class="comment">*</span><span class="comment"> to make the rows and columns of A more equal in
</span><span class="comment">*</span><span class="comment"> norm. Do not permute;
</span><span class="comment">*</span><span class="comment"> = 'B': Both diagonally scale and permute A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Computed reciprocal condition numbers will be for the matrix
</span><span class="comment">*</span><span class="comment"> after balancing and/or permuting. Permuting does not change
</span><span class="comment">*</span><span class="comment"> condition numbers (in exact arithmetic), but balancing does.
</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': left eigenvectors of A are not computed;
</span><span class="comment">*</span><span class="comment"> = 'V': left eigenvectors of A are computed.
</span><span class="comment">*</span><span class="comment"> If SENSE = 'E' or 'B', JOBVL must = 'V'.
</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': right eigenvectors of A are not computed;
</span><span class="comment">*</span><span class="comment"> = 'V': right eigenvectors of A are computed.
</span><span class="comment">*</span><span class="comment"> If SENSE = 'E' or 'B', JOBVR must = 'V'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SENSE (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> Determines which reciprocal condition numbers are computed.
</span><span class="comment">*</span><span class="comment"> = 'N': None are computed;
</span><span class="comment">*</span><span class="comment"> = 'E': Computed for eigenvalues only;
</span><span class="comment">*</span><span class="comment"> = 'V': Computed for right eigenvectors only;
</span><span class="comment">*</span><span class="comment"> = 'B': Computed for eigenvalues and right eigenvectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If SENSE = 'E' or 'B', both left and right eigenvectors
</span><span class="comment">*</span><span class="comment"> must also be computed (JOBVL = 'V' and JOBVR = 'V').
</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) COMPLEX 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. If JOBVL = 'V' or
</span><span class="comment">*</span><span class="comment"> JOBVR = 'V', A contains the Schur form of the balanced
</span><span class="comment">*</span><span class="comment"> version of the matrix A.
</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"> W (output) COMPLEX array, dimension (N)
</span><span class="comment">*</span><span class="comment"> W contains the computed eigenvalues.
</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 eigenvectors u(j) are stored one
</span><span class="comment">*</span><span class="comment"> after another in the columns of VL, in the same order
</span><span class="comment">*</span><span class="comment"> as their eigenvalues.
</span><span class="comment">*</span><span class="comment"> If JOBVL = 'N', VL is not referenced.
</span><span class="comment">*</span><span class="comment"> u(j) = VL(:,j), the j-th column of VL.
</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 array VL. LDVL >= 1; if
</span><span class="comment">*</span><span class="comment"> 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 eigenvectors v(j) are stored one
</span><span class="comment">*</span><span class="comment"> after another in the columns of VR, in the same order
</span><span class="comment">*</span><span class="comment"> as their eigenvalues.
</span><span class="comment">*</span><span class="comment"> If JOBVR = 'N', VR is not referenced.
</span><span class="comment">*</span><span class="comment"> v(j) = VR(:,j), the j-th column of VR.
</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 array VR. LDVR >= 1; if
</span><span class="comment">*</span><span class="comment"> JOBVR = 'V', LDVR >= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ILO (output) INTEGER
</span><span class="comment">*</span><span class="comment"> IHI (output) INTEGER
</span><span class="comment">*</span><span class="comment"> ILO and IHI are integer values determined when A was
</span><span class="comment">*</span><span class="comment"> balanced. The balanced A(i,j) = 0 if I > J and
</span><span class="comment">*</span><span class="comment"> J = 1,...,ILO-1 or I = IHI+1,...,N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SCALE (output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment"> Details of the permutations and scaling factors applied
</span><span class="comment">*</span><span class="comment"> when balancing A. If P(j) is the index of the row and column
</span><span class="comment">*</span><span class="comment"> interchanged with row and column j, and D(j) is the scaling
</span><span class="comment">*</span><span class="comment"> factor applied to row and column j, then
</span><span class="comment">*</span><span class="comment"> SCALE(J) = P(J), for J = 1,...,ILO-1
</span><span class="comment">*</span><span class="comment"> = D(J), for J = ILO,...,IHI
</span><span class="comment">*</span><span class="comment"> = P(J) for J = IHI+1,...,N.
</span><span class="comment">*</span><span class="comment"> The order in which the interchanges are made is N to IHI+1,
</span><span class="comment">*</span><span class="comment"> then 1 to ILO-1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ABNRM (output) REAL
</span><span class="comment">*</span><span class="comment"> The one-norm of the balanced matrix (the maximum
</span><span class="comment">*</span><span class="comment"> of the sum of absolute values of elements of any column).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RCONDE (output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment"> RCONDE(j) is the reciprocal condition number of the j-th
</span><span class="comment">*</span><span class="comment"> eigenvalue.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RCONDV (output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment"> RCONDV(j) is the reciprocal condition number of the j-th
</span><span class="comment">*</span><span class="comment"> right eigenvector.
</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. If SENSE = 'N' or 'E',
</span><span class="comment">*</span><span class="comment"> LWORK >= max(1,2*N), and if SENSE = 'V' or 'B',
</span><span class="comment">*</span><span class="comment"> LWORK >= N*N+2*N.
</span><span class="comment">*</span><span class="comment"> For good performance, LWORK must generally be larger.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?