sgeesx.f.html

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

HTML
552
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>sgeesx.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="SGEESX.1"></a><a href="sgeesx.f.html#SGEESX.1">SGEESX</a>( JOBVS, SORT, SELECT, SENSE, N, A, LDA, SDIM,
     $                   WR, WI, VS, LDVS, RCONDE, RCONDV, WORK, LWORK,
     $                   IWORK, LIWORK, 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, SENSE, SORT
      INTEGER            INFO, LDA, LDVS, LIWORK, LWORK, N, SDIM
      REAL               RCONDE, RCONDV
<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, * ), 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="SGEESX.28"></a><a href="sgeesx.f.html#SGEESX.1">SGEESX</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">  computes a reciprocal condition number for the average of the
</span><span class="comment">*</span><span class="comment">  selected eigenvalues (RCONDE); and computes a reciprocal condition
</span><span class="comment">*</span><span class="comment">  number for the right invariant subspace corresponding to the
</span><span class="comment">*</span><span class="comment">  selected eigenvalues (RCONDV).  The leading columns of Z form an
</span><span class="comment">*</span><span class="comment">  orthonormal basis for this invariant subspace.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  For further explanation of the reciprocal condition numbers RCONDE
</span><span class="comment">*</span><span class="comment">  and RCONDV, see Section 4.10 of the LAPACK Users' Guide (where
</span><span class="comment">*</span><span class="comment">  these quantities are called s and sep respectively).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  A real matrix is in real Schur form if it is upper quasi-triangular
</span><span class="comment">*</span><span class="comment">  with 1-by-1 and 2-by-2 blocks. 2-by-2 blocks will be standardized in
</span><span class="comment">*</span><span class="comment">  the 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 &lt; 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 REAL 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
</span><span class="comment">*</span><span class="comment">          complex conjugate pair of eigenvalues is selected, then both
</span><span class="comment">*</span><span class="comment">          are.  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 may be set to N+3 (see INFO below).
</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 average of selected eigenvalues only;
</span><span class="comment">*</span><span class="comment">          = 'V': Computed for selected right invariant subspace only;
</span><span class="comment">*</span><span class="comment">          = 'B': Computed for both.
</span><span class="comment">*</span><span class="comment">          If SENSE = 'E', 'V' or 'B', SORT must equal 'S'.
</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 &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 N-by-N matrix A.
</span><span class="comment">*</span><span class="comment">          On exit, A is 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 &gt;= 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) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment">  WI      (output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment">          WR and WI contain the real and imaginary parts, respectively,
</span><span class="comment">*</span><span class="comment">          of the computed eigenvalues, in the same order that they
</span><span class="comment">*</span><span class="comment">          appear on the diagonal of the output Schur form T.  Complex
</span><span class="comment">*</span><span class="comment">          conjugate pairs of eigenvalues appear consecutively with the
</span><span class="comment">*</span><span class="comment">          eigenvalue having the positive imaginary part first.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  VS      (output) REAL 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 &gt;= 1, and if
</span><span class="comment">*</span><span class="comment">          JOBVS = 'V', LDVS &gt;= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RCONDE  (output) REAL
</span><span class="comment">*</span><span class="comment">          If SENSE = 'E' or 'B', RCONDE contains the reciprocal
</span><span class="comment">*</span><span class="comment">          condition number for the average of the selected eigenvalues.
</span><span class="comment">*</span><span class="comment">          Not referenced if SENSE = 'N' or 'V'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RCONDV  (output) REAL
</span><span class="comment">*</span><span class="comment">          If SENSE = 'V' or 'B', RCONDV contains the reciprocal
</span><span class="comment">*</span><span class="comment">          condition number for the selected right invariant subspace.
</span><span class="comment">*</span><span class="comment">          Not referenced if SENSE = 'N' or 'E'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  WORK    (workspace/output) REAL 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 &gt;= max(1,3*N).
</span><span class="comment">*</span><span class="comment">          Also, if SENSE = 'E' or 'V' or 'B',
</span><span class="comment">*</span><span class="comment">          LWORK &gt;= N+2*SDIM*(N-SDIM), where SDIM is the number of
</span><span class="comment">*</span><span class="comment">          selected eigenvalues computed by this routine.  Note that
</span><span class="comment">*</span><span class="comment">          N+2*SDIM*(N-SDIM) &lt;= N+N*N/2. Note also that an error is only
</span><span class="comment">*</span><span class="comment">          returned if LWORK &lt; max(1,3*N), but if SENSE = 'E' or 'V' or
</span><span class="comment">*</span><span class="comment">          'B' this may not be large enough.
</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 upper bounds on the optimal sizes of the
</span><span class="comment">*</span><span class="comment">          arrays WORK and IWORK, returns these values as the first
</span><span class="comment">*</span><span class="comment">          entries of the WORK and IWORK arrays, and no error messages
</span><span class="comment">*</span><span class="comment">          related to LWORK or LIWORK are issued by <a name="XERBLA.148"></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">  IWORK   (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
</span><span class="comment">*</span><span class="comment">          On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LIWORK  (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The dimension of the array IWORK.
</span><span class="comment">*</span><span class="comment">          LIWORK &gt;= 1; if SENSE = 'V' or 'B', LIWORK &gt;= SDIM*(N-SDIM).
</span><span class="comment">*</span><span class="comment">          Note that SDIM*(N-SDIM) &lt;= N*N/4. Note also that an error is
</span><span class="comment">*</span><span class="comment">          only returned if LIWORK &lt; 1, but if SENSE = 'V' or 'B' this
</span><span class="comment">*</span><span class="comment">          may not be large enough.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If LIWORK = -1, then a workspace query is assumed; the
</span><span class="comment">*</span><span class="comment">          routine only calculates upper bounds on the optimal sizes of
</span><span class="comment">*</span><span class="comment">          the arrays WORK and IWORK, returns these values as the first
</span><span class="comment">*</span><span class="comment">          entries of the WORK and IWORK arrays, and no error messages
</span><span class="comment">*</span><span class="comment">          related to LWORK or LIWORK are issued by <a name="XERBLA.164"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>.
</span><span class="comment">*</span><span class="comment">

⌨️ 快捷键说明

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