strsen.f.html

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

HTML
486
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>strsen.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="STRSEN.1"></a><a href="strsen.f.html#STRSEN.1">STRSEN</a>( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, WR, WI,
     $                   M, S, SEP, WORK, LWORK, IWORK, LIWORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- LAPACK 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">     Modified to call <a name="SLACN2.8"></a><a href="slacn2.f.html#SLACN2.1">SLACN2</a> in place of <a name="SLACON.8"></a><a href="slacon.f.html#SLACON.1">SLACON</a>, 7 Feb 03, SJH.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      CHARACTER          COMPQ, JOB
      INTEGER            INFO, LDQ, LDT, LIWORK, LWORK, M, N
      REAL               S, SEP
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      LOGICAL            SELECT( * )
      INTEGER            IWORK( * )
      REAL               Q( LDQ, * ), T( LDT, * ), WI( * ), WORK( * ),
     $                   WR( * )
<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="STRSEN.25"></a><a href="strsen.f.html#STRSEN.1">STRSEN</a> reorders the real Schur factorization of a real matrix
</span><span class="comment">*</span><span class="comment">  A = Q*T*Q**T, so that a selected cluster of eigenvalues appears in
</span><span class="comment">*</span><span class="comment">  the leading diagonal blocks of the upper quasi-triangular matrix T,
</span><span class="comment">*</span><span class="comment">  and the leading columns of Q form an orthonormal basis of the
</span><span class="comment">*</span><span class="comment">  corresponding right invariant subspace.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Optionally the routine computes the reciprocal condition numbers of
</span><span class="comment">*</span><span class="comment">  the cluster of eigenvalues and/or the invariant subspace.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  T must be in Schur canonical form (as returned by <a name="SHSEQR.34"></a><a href="shseqr.f.html#SHSEQR.1">SHSEQR</a>), that is,
</span><span class="comment">*</span><span class="comment">  block upper triangular with 1-by-1 and 2-by-2 diagonal blocks; each
</span><span class="comment">*</span><span class="comment">  2-by-2 diagonal block has its diagonal elemnts equal and its
</span><span class="comment">*</span><span class="comment">  off-diagonal elements of opposite sign.
</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">  JOB     (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          Specifies whether condition numbers are required for the
</span><span class="comment">*</span><span class="comment">          cluster of eigenvalues (S) or the invariant subspace (SEP):
</span><span class="comment">*</span><span class="comment">          = 'N': none;
</span><span class="comment">*</span><span class="comment">          = 'E': for eigenvalues only (S);
</span><span class="comment">*</span><span class="comment">          = 'V': for invariant subspace only (SEP);
</span><span class="comment">*</span><span class="comment">          = 'B': for both eigenvalues and invariant subspace (S and
</span><span class="comment">*</span><span class="comment">                 SEP).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  COMPQ   (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'V': update the matrix Q of Schur vectors;
</span><span class="comment">*</span><span class="comment">          = 'N': do not update Q.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  SELECT  (input) LOGICAL array, dimension (N)
</span><span class="comment">*</span><span class="comment">          SELECT specifies the eigenvalues in the selected cluster. To
</span><span class="comment">*</span><span class="comment">          select a real eigenvalue w(j), SELECT(j) must be set to
</span><span class="comment">*</span><span class="comment">          .TRUE.. To select a complex conjugate pair of eigenvalues
</span><span class="comment">*</span><span class="comment">          w(j) and w(j+1), corresponding to a 2-by-2 diagonal block,
</span><span class="comment">*</span><span class="comment">          either SELECT(j) or SELECT(j+1) or both must be set to
</span><span class="comment">*</span><span class="comment">          .TRUE.; a complex conjugate pair of eigenvalues must be
</span><span class="comment">*</span><span class="comment">          either both included in the cluster or both excluded.
</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 T. N &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  T       (input/output) REAL array, dimension (LDT,N)
</span><span class="comment">*</span><span class="comment">          On entry, the upper quasi-triangular matrix T, in Schur
</span><span class="comment">*</span><span class="comment">          canonical form.
</span><span class="comment">*</span><span class="comment">          On exit, T is overwritten by the reordered matrix T, again in
</span><span class="comment">*</span><span class="comment">          Schur canonical form, with the selected eigenvalues in the
</span><span class="comment">*</span><span class="comment">          leading diagonal blocks.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDT     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array T. LDT &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Q       (input/output) REAL array, dimension (LDQ,N)
</span><span class="comment">*</span><span class="comment">          On entry, if COMPQ = 'V', the matrix Q of Schur vectors.
</span><span class="comment">*</span><span class="comment">          On exit, if COMPQ = 'V', Q has been postmultiplied by the
</span><span class="comment">*</span><span class="comment">          orthogonal transformation matrix which reorders T; the
</span><span class="comment">*</span><span class="comment">          leading M columns of Q form an orthonormal basis for the
</span><span class="comment">*</span><span class="comment">          specified invariant subspace.
</span><span class="comment">*</span><span class="comment">          If COMPQ = 'N', Q is not referenced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDQ     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array Q.
</span><span class="comment">*</span><span class="comment">          LDQ &gt;= 1; and if COMPQ = 'V', LDQ &gt;= N.
</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">          The real and imaginary parts, respectively, of the reordered
</span><span class="comment">*</span><span class="comment">          eigenvalues of T. The eigenvalues are stored in the same
</span><span class="comment">*</span><span class="comment">          order as on the diagonal of T, with WR(i) = T(i,i) and, if
</span><span class="comment">*</span><span class="comment">          T(i:i+1,i:i+1) is a 2-by-2 diagonal block, WI(i) &gt; 0 and
</span><span class="comment">*</span><span class="comment">          WI(i+1) = -WI(i). Note that if a complex eigenvalue is
</span><span class="comment">*</span><span class="comment">          sufficiently ill-conditioned, then its value may differ
</span><span class="comment">*</span><span class="comment">          significantly from its value before reordering.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  M       (output) INTEGER
</span><span class="comment">*</span><span class="comment">          The dimension of the specified invariant subspace.
</span><span class="comment">*</span><span class="comment">          0 &lt; = M &lt;= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  S       (output) REAL
</span><span class="comment">*</span><span class="comment">          If JOB = 'E' or 'B', S is a lower bound on the reciprocal
</span><span class="comment">*</span><span class="comment">          condition number for the selected cluster of eigenvalues.
</span><span class="comment">*</span><span class="comment">          S cannot underestimate the true reciprocal condition number
</span><span class="comment">*</span><span class="comment">          by more than a factor of sqrt(N). If M = 0 or N, S = 1.
</span><span class="comment">*</span><span class="comment">          If JOB = 'N' or 'V', S is not referenced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  SEP     (output) REAL
</span><span class="comment">*</span><span class="comment">          If JOB = 'V' or 'B', SEP is the estimated reciprocal
</span><span class="comment">*</span><span class="comment">          condition number of the specified invariant subspace. If
</span><span class="comment">*</span><span class="comment">          M = 0 or N, SEP = norm(T).
</span><span class="comment">*</span><span class="comment">          If JOB = 'N' or 'E', SEP is not referenced.
</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.
</span><span class="comment">*</span><span class="comment">          If JOB = 'N', LWORK &gt;= max(1,N);
</span><span class="comment">*</span><span class="comment">          if JOB = 'E', LWORK &gt;= max(1,M*(N-M));
</span><span class="comment">*</span><span class="comment">          if JOB = 'V' or 'B', LWORK &gt;= max(1,2*M*(N-M)).
</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.128"></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) 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">          If JOB = 'N' or 'E', LIWORK &gt;= 1;
</span><span class="comment">*</span><span class="comment">          if JOB = 'V' or 'B', LIWORK &gt;= max(1,M*(N-M)).
</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 the optimal size of the IWORK array,
</span><span class="comment">*</span><span class="comment">          returns this value as the first entry of the IWORK array, and
</span><span class="comment">*</span><span class="comment">          no error message related to LIWORK is issued by <a name="XERBLA.141"></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

⌨️ 快捷键说明

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