slaed3.f.html

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

HTML
289
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>slaed3.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="SLAED3.1"></a><a href="slaed3.f.html#SLAED3.1">SLAED3</a>( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX,
     $                   CTOT, W, S, 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">     .. Scalar Arguments ..
</span>      INTEGER            INFO, K, LDQ, N, N1
      REAL               RHO
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      INTEGER            CTOT( * ), INDX( * )
      REAL               D( * ), DLAMDA( * ), Q( LDQ, * ), Q2( * ),
     $                   S( * ), W( * )
<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="SLAED3.21"></a><a href="slaed3.f.html#SLAED3.1">SLAED3</a> finds the roots of the secular equation, as defined by the
</span><span class="comment">*</span><span class="comment">  values in D, W, and RHO, between 1 and K.  It makes the
</span><span class="comment">*</span><span class="comment">  appropriate calls to <a name="SLAED4.23"></a><a href="slaed4.f.html#SLAED4.1">SLAED4</a> and then updates the eigenvectors by
</span><span class="comment">*</span><span class="comment">  multiplying the matrix of eigenvectors of the pair of eigensystems
</span><span class="comment">*</span><span class="comment">  being combined by the matrix of eigenvectors of the K-by-K system
</span><span class="comment">*</span><span class="comment">  which is solved here.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  This code makes very mild assumptions about floating point
</span><span class="comment">*</span><span class="comment">  arithmetic. It will work on machines with a guard digit in
</span><span class="comment">*</span><span class="comment">  add/subtract, or on those binary machines without guard digits
</span><span class="comment">*</span><span class="comment">  which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
</span><span class="comment">*</span><span class="comment">  It could conceivably fail on hexadecimal or decimal machines
</span><span class="comment">*</span><span class="comment">  without guard digits, but we know of none.
</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">  K       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of terms in the rational function to be solved by
</span><span class="comment">*</span><span class="comment">          <a name="SLAED4.40"></a><a href="slaed4.f.html#SLAED4.1">SLAED4</a>.  K &gt;= 0.
</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 number of rows and columns in the Q matrix.
</span><span class="comment">*</span><span class="comment">          N &gt;= K (deflation may result in N&gt;K).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  N1      (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The location of the last eigenvalue in the leading submatrix.
</span><span class="comment">*</span><span class="comment">          min(1,N) &lt;= N1 &lt;= N/2.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  D       (output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment">          D(I) contains the updated eigenvalues for
</span><span class="comment">*</span><span class="comment">          1 &lt;= I &lt;= K.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Q       (output) REAL array, dimension (LDQ,N)
</span><span class="comment">*</span><span class="comment">          Initially the first K columns are used as workspace.
</span><span class="comment">*</span><span class="comment">          On output the columns 1 to K contain
</span><span class="comment">*</span><span class="comment">          the updated eigenvectors.
</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.  LDQ &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RHO     (input) REAL
</span><span class="comment">*</span><span class="comment">          The value of the parameter in the rank one update equation.
</span><span class="comment">*</span><span class="comment">          RHO &gt;= 0 required.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  DLAMDA  (input/output) REAL array, dimension (K)
</span><span class="comment">*</span><span class="comment">          The first K elements of this array contain the old roots
</span><span class="comment">*</span><span class="comment">          of the deflated updating problem.  These are the poles
</span><span class="comment">*</span><span class="comment">          of the secular equation. May be changed on output by
</span><span class="comment">*</span><span class="comment">          having lowest order bit set to zero on Cray X-MP, Cray Y-MP,
</span><span class="comment">*</span><span class="comment">          Cray-2, or Cray C-90, as described above.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Q2      (input) REAL array, dimension (LDQ2, N)
</span><span class="comment">*</span><span class="comment">          The first K columns of this matrix contain the non-deflated
</span><span class="comment">*</span><span class="comment">          eigenvectors for the split problem.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  INDX    (input) INTEGER array, dimension (N)
</span><span class="comment">*</span><span class="comment">          The permutation used to arrange the columns of the deflated
</span><span class="comment">*</span><span class="comment">          Q matrix into three groups (see <a name="SLAED2.79"></a><a href="slaed2.f.html#SLAED2.1">SLAED2</a>).
</span><span class="comment">*</span><span class="comment">          The rows of the eigenvectors found by <a name="SLAED4.80"></a><a href="slaed4.f.html#SLAED4.1">SLAED4</a> must be likewise
</span><span class="comment">*</span><span class="comment">          permuted before the matrix multiply can take place.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  CTOT    (input) INTEGER array, dimension (4)
</span><span class="comment">*</span><span class="comment">          A count of the total number of the various types of columns
</span><span class="comment">*</span><span class="comment">          in Q, as described in INDX.  The fourth column type is any
</span><span class="comment">*</span><span class="comment">          column which has been deflated.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  W       (input/output) REAL array, dimension (K)
</span><span class="comment">*</span><span class="comment">          The first K elements of this array contain the components
</span><span class="comment">*</span><span class="comment">          of the deflation-adjusted updating vector. Destroyed on
</span><span class="comment">*</span><span class="comment">          output.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  S       (workspace) REAL array, dimension (N1 + 1)*K
</span><span class="comment">*</span><span class="comment">          Will contain the eigenvectors of the repaired matrix which
</span><span class="comment">*</span><span class="comment">          will be multiplied by the previously accumulated eigenvectors
</span><span class="comment">*</span><span class="comment">          to update the system.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDS     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of S.  LDS &gt;= max(1,K).
</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">          &gt; 0:  if INFO = 1, an eigenvalue did not converge
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Further Details
</span><span class="comment">*</span><span class="comment">  ===============
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Based on contributions by
</span><span class="comment">*</span><span class="comment">     Jeff Rutter, Computer Science Division, University of California
</span><span class="comment">*</span><span class="comment">     at Berkeley, USA
</span><span class="comment">*</span><span class="comment">  Modified by Francoise Tisseur, University of Tennessee.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  =====================================================================
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Parameters ..
</span>      REAL               ONE, ZERO
      PARAMETER          ( ONE = 1.0E0, ZERO = 0.0E0 )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      INTEGER            I, II, IQ2, J, N12, N2, N23
      REAL               TEMP
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      REAL               <a name="SLAMC3.125"></a><a href="slamch.f.html#SLAMC3.574">SLAMC3</a>, SNRM2
      EXTERNAL           <a name="SLAMC3.126"></a><a href="slamch.f.html#SLAMC3.574">SLAMC3</a>, SNRM2

⌨️ 快捷键说明

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