sggevx.f.html

来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 741 行 · 第 1/4 页

HTML
741
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>sggevx.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="SGGEVX.1"></a><a href="sggevx.f.html#SGGEVX.1">SGGEVX</a>( BALANC, JOBVL, JOBVR, SENSE, N, A, LDA, B, LDB,
     $                   ALPHAR, ALPHAI, BETA, VL, LDVL, VR, LDVR, ILO,
     $                   IHI, LSCALE, RSCALE, ABNRM, BBNRM, RCONDE,
     $                   RCONDV, WORK, LWORK, IWORK, 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          BALANC, JOBVL, JOBVR, SENSE
      INTEGER            IHI, ILO, INFO, LDA, LDB, LDVL, LDVR, LWORK, N
      REAL               ABNRM, BBNRM
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      LOGICAL            BWORK( * )
      INTEGER            IWORK( * )
      REAL               A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
     $                   B( LDB, * ), BETA( * ), LSCALE( * ),
     $                   RCONDE( * ), RCONDV( * ), RSCALE( * ),
     $                   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="SGGEVX.27"></a><a href="sggevx.f.html#SGGEVX.1">SGGEVX</a> computes for a pair of N-by-N real nonsymmetric matrices (A,B)
</span><span class="comment">*</span><span class="comment">  the generalized eigenvalues, and optionally, the left and/or right
</span><span class="comment">*</span><span class="comment">  generalized 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">  LSCALE, RSCALE, ABNRM, and BBNRM), reciprocal condition numbers for
</span><span class="comment">*</span><span class="comment">  the eigenvalues (RCONDE), and reciprocal condition numbers for the
</span><span class="comment">*</span><span class="comment">  right eigenvectors (RCONDV).
</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 eigenvector v(j) corresponding to the eigenvalue lambda(j)
</span><span class="comment">*</span><span class="comment">  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 eigenvector u(j) corresponding to the eigenvalue lambda(j)
</span><span class="comment">*</span><span class="comment">  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">
</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">          Specifies the balance option to be performed.
</span><span class="comment">*</span><span class="comment">          = 'N':  do not diagonally scale or permute;
</span><span class="comment">*</span><span class="comment">          = 'P':  permute only;
</span><span class="comment">*</span><span class="comment">          = 'S':  scale only;
</span><span class="comment">*</span><span class="comment">          = 'B':  both permute and scale.
</span><span class="comment">*</span><span class="comment">          Computed reciprocal condition numbers will be for the
</span><span class="comment">*</span><span class="comment">          matrices after permuting and/or balancing. Permuting does
</span><span class="comment">*</span><span class="comment">          not change condition numbers (in exact arithmetic), but
</span><span class="comment">*</span><span class="comment">          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':  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">  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 eigenvectors only;
</span><span class="comment">*</span><span class="comment">          = 'B': computed for eigenvalues and 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 &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  A       (input/output) REAL 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. If JOBVL='V' or JOBVR='V'
</span><span class="comment">*</span><span class="comment">          or both, then A contains the first part of the real Schur
</span><span class="comment">*</span><span class="comment">          form of the &quot;balanced&quot; versions of the input A and B.
</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 &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  B       (input/output) REAL 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. If JOBVL='V' or JOBVR='V'
</span><span class="comment">*</span><span class="comment">          or both, then B contains the second part of the real Schur
</span><span class="comment">*</span><span class="comment">          form of the &quot;balanced&quot; versions of the input A and B.
</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 &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  ALPHAR  (output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment">  ALPHAI  (output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment">  BETA    (output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment">          On exit, (ALPHAR(j) + ALPHAI(j)*i)/BETA(j), j=1,...,N, will
</span><span class="comment">*</span><span class="comment">          be the generalized eigenvalues.  If ALPHAI(j) is zero, then
</span><span class="comment">*</span><span class="comment">          the j-th 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) negative.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          Note: the quotients ALPHAR(j)/BETA(j) and ALPHAI(j)/BETA(j)
</span><span class="comment">*</span><span class="comment">          may easily over- or underflow, and BETA(j) may even be zero.
</span><span class="comment">*</span><span class="comment">          Thus, the user should avoid naively computing the ratio
</span><span class="comment">*</span><span class="comment">          ALPHA/BETA. However, ALPHAR and ALPHAI will be always less
</span><span class="comment">*</span><span class="comment">          than and usually comparable with norm(A) in magnitude, and
</span><span class="comment">*</span><span class="comment">          BETA always less 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) REAL 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 as
</span><span class="comment">*</span><span class="comment">          their eigenvalues. If the j-th eigenvalue is real, then
</span><span class="comment">*</span><span class="comment">          u(j) = VL(:,j), the j-th column of VL. If the j-th and
</span><span class="comment">*</span><span class="comment">          (j+1)-th eigenvalues form a complex conjugate pair, then
</span><span class="comment">*</span><span class="comment">          u(j) = VL(:,j)+i*VL(:,j+1) and u(j+1) = VL(:,j)-i*VL(:,j+1).
</span><span class="comment">*</span><span class="comment">          Each eigenvector will be scaled so the largest component have
</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 &gt;= 1, and
</span><span class="comment">*</span><span class="comment">          if JOBVL = 'V', LDVL &gt;= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  VR      (output) REAL 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 as
</span><span class="comment">*</span><span class="comment">          their eigenvalues. If the j-th eigenvalue is real, then
</span><span class="comment">*</span><span class="comment">          v(j) = VR(:,j), the j-th column of VR. If the j-th and
</span><span class="comment">*</span><span class="comment">          (j+1)-th eigenvalues form a complex conjugate pair, then
</span><span class="comment">*</span><span class="comment">          v(j) = VR(:,j)+i*VR(:,j+1) and v(j+1) = VR(:,j)-i*VR(:,j+1).
</span><span class="comment">*</span><span class="comment">          Each eigenvector will be scaled so the largest component have
</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 &gt;= 1, and
</span><span class="comment">*</span><span class="comment">          if JOBVR = 'V', LDVR &gt;= 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 such that on exit
</span><span class="comment">*</span><span class="comment">          A(i,j) = 0 and B(i,j) = 0 if i &gt; 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">          If BALANC = 'N' or 'S', ILO = 1 and IHI = N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LSCALE  (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">          to the left side of A and B.  If PL(j) is the index of the
</span><span class="comment">*</span><span class="comment">          row interchanged with row j, and DL(j) is the scaling
</span><span class="comment">*</span><span class="comment">          factor applied to row j, then
</span><span class="comment">*</span><span class="comment">            LSCALE(j) = PL(j)  for j = 1,...,ILO-1
</span><span class="comment">*</span><span class="comment">                      = DL(j)  for j = ILO,...,IHI
</span><span class="comment">*</span><span class="comment">                      = PL(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,

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?