sgegs.f.html

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

HTML
463
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>sgegs.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="SGEGS.1"></a><a href="sgegs.f.html#SGEGS.1">SGEGS</a>( JOBVSL, JOBVSR, N, A, LDA, B, LDB, ALPHAR,
     $                  ALPHAI, BETA, VSL, LDVSL, VSR, LDVSR, 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          JOBVSL, JOBVSR
      INTEGER            INFO, LDA, LDB, LDVSL, LDVSR, LWORK, N
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      REAL               A( LDA, * ), ALPHAI( * ), ALPHAR( * ),
     $                   B( LDB, * ), BETA( * ), VSL( LDVSL, * ),
     $                   VSR( LDVSR, * ), 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="SGGES.22"></a><a href="sgges.f.html#SGGES.1">SGGES</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  <a name="SGEGS.24"></a><a href="sgegs.f.html#SGEGS.1">SGEGS</a> computes the eigenvalues, real Schur form, and, optionally,
</span><span class="comment">*</span><span class="comment">  left and or/right Schur vectors of a real matrix pair (A,B).
</span><span class="comment">*</span><span class="comment">  Given two square matrices A and B, the generalized real Schur
</span><span class="comment">*</span><span class="comment">  factorization has the form
</span><span class="comment">*</span><span class="comment">  
</span><span class="comment">*</span><span class="comment">    A = Q*S*Z**T,  B = Q*T*Z**T
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  where Q and Z are orthogonal matrices, T is upper triangular, and S
</span><span class="comment">*</span><span class="comment">  is an upper quasi-triangular matrix with 1-by-1 and 2-by-2 diagonal
</span><span class="comment">*</span><span class="comment">  blocks, the 2-by-2 blocks corresponding to complex conjugate pairs
</span><span class="comment">*</span><span class="comment">  of eigenvalues of (A,B).  The columns of Q are the left Schur vectors
</span><span class="comment">*</span><span class="comment">  and the columns of Z are the right Schur vectors.
</span><span class="comment">*</span><span class="comment">  
</span><span class="comment">*</span><span class="comment">  If only the eigenvalues of (A,B) are needed, the driver routine
</span><span class="comment">*</span><span class="comment">  <a name="SGEGV.38"></a><a href="sgegv.f.html#SGEGV.1">SGEGV</a> should be used instead.  See <a name="SGEGV.38"></a><a href="sgegv.f.html#SGEGV.1">SGEGV</a> for a description of the
</span><span class="comment">*</span><span class="comment">  eigenvalues of the generalized nonsymmetric eigenvalue problem
</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">  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">  JOBVSL  (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'N':  do not compute the left Schur vectors;
</span><span class="comment">*</span><span class="comment">          = 'V':  compute the left Schur vectors (returned in VSL).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  JOBVSR  (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'N':  do not compute the right Schur vectors;
</span><span class="comment">*</span><span class="comment">          = 'V':  compute the right Schur vectors (returned in VSR).
</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, VSL, and VSR.  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.
</span><span class="comment">*</span><span class="comment">          On exit, the upper quasi-triangular matrix S from the
</span><span class="comment">*</span><span class="comment">          generalized real Schur factorization.
</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.
</span><span class="comment">*</span><span class="comment">          On exit, the upper triangular matrix T from the generalized
</span><span class="comment">*</span><span class="comment">          real Schur factorization.
</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">          The real parts of each scalar alpha defining an eigenvalue
</span><span class="comment">*</span><span class="comment">          of GNEP.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  ALPHAI  (output) REAL 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 (j+1)-st
</span><span class="comment">*</span><span class="comment">          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) REAL 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">          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">  VSL     (output) REAL array, dimension (LDVSL,N)
</span><span class="comment">*</span><span class="comment">          If JOBVSL = 'V', the matrix of left Schur vectors Q.
</span><span class="comment">*</span><span class="comment">          Not referenced if JOBVSL = 'N'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDVSL   (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the matrix VSL. LDVSL &gt;=1, and
</span><span class="comment">*</span><span class="comment">          if JOBVSL = 'V', LDVSL &gt;= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  VSR     (output) REAL array, dimension (LDVSR,N)
</span><span class="comment">*</span><span class="comment">          If JOBVSR = 'V', the matrix of right Schur vectors Z.
</span><span class="comment">*</span><span class="comment">          Not referenced if JOBVSR = 'N'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDVSR   (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the matrix VSR. LDVSR &gt;= 1, and
</span><span class="comment">*</span><span class="comment">          if JOBVSR = 'V', LDVSR &gt;= N.
</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,4*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">          To compute the optimal value of LWORK, call <a name="ILAENV.113"></a><a href="hfy-index.html#ILAENV">ILAENV</a> to get
</span><span class="comment">*</span><span class="comment">          blocksizes (for <a name="SGEQRF.114"></a><a href="sgeqrf.f.html#SGEQRF.1">SGEQRF</a>, <a name="SORMQR.114"></a><a href="sormqr.f.html#SORMQR.1">SORMQR</a>, and <a name="SORGQR.114"></a><a href="sorgqr.f.html#SORGQR.1">SORGQR</a>.)  Then compute:
</span><span class="comment">*</span><span class="comment">          NB  -- MAX of the blocksizes for <a name="SGEQRF.115"></a><a href="sgeqrf.f.html#SGEQRF.1">SGEQRF</a>, <a name="SORMQR.115"></a><a href="sormqr.f.html#SORMQR.1">SORMQR</a>, and <a name="SORGQR.115"></a><a href="sorgqr.f.html#SORGQR.1">SORGQR</a>
</span><span class="comment">*</span><span class="comment">          The optimal LWORK is  2*N + N*(NB+1).
</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.121"></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">  INFO    (output) INTEGER
</span><span class="comment">*</span><span class="comment">          = 0:  successful exit
</span><span class="comment">*</span><span class="comment">          &lt; 0:  if INFO = -i, the i-th argument had an illegal value.
</span><span class="comment">*</span><span class="comment">          = 1,...,N:
</span><span class="comment">*</span><span class="comment">                The QZ iteration failed.  (A,B) are not in Schur
</span><span class="comment">*</span><span class="comment">                form, but ALPHAR(j), ALPHAI(j), and BETA(j) should
</span><span class="comment">*</span><span class="comment">                be correct for j=INFO+1,...,N.
</span><span class="comment">*</span><span class="comment">          &gt; N:  errors that usually indicate LAPACK problems:
</span><span class="comment">*</span><span class="comment">                =N+1: error return from <a name="SGGBAL.131"></a><a href="sggbal.f.html#SGGBAL.1">SGGBAL</a>
</span><span class="comment">*</span><span class="comment">                =N+2: error return from <a name="SGEQRF.132"></a><a href="sgeqrf.f.html#SGEQRF.1">SGEQRF</a>
</span><span class="comment">*</span><span class="comment">                =N+3: error return from <a name="SORMQR.133"></a><a href="sormqr.f.html#SORMQR.1">SORMQR</a>
</span><span class="comment">*</span><span class="comment">                =N+4: error return from <a name="SORGQR.134"></a><a href="sorgqr.f.html#SORGQR.1">SORGQR</a>
</span><span class="comment">*</span><span class="comment">                =N+5: error return from <a name="SGGHRD.135"></a><a href="sgghrd.f.html#SGGHRD.1">SGGHRD</a>
</span><span class="comment">*</span><span class="comment">                =N+6: error return from <a name="SHGEQZ.136"></a><a href="shgeqz.f.html#SHGEQZ.1">SHGEQZ</a> (other than failed

⌨️ 快捷键说明

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