dstemr.f.html

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

HTML
672
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>dstemr.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="DSTEMR.1"></a><a href="dstemr.f.html#DSTEMR.1">DSTEMR</a>( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
     $                   M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
     $                   IWORK, LIWORK, INFO )
      IMPLICIT NONE
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- LAPACK computational 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          JOBZ, RANGE
      LOGICAL            TRYRAC
      INTEGER            IL, INFO, IU, LDZ, NZC, LIWORK, LWORK, M, N
      DOUBLE PRECISION VL, VU
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      INTEGER            ISUPPZ( * ), IWORK( * )
      DOUBLE PRECISION   D( * ), E( * ), W( * ), WORK( * )
      DOUBLE PRECISION   Z( LDZ, * )
<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="DSTEMR.25"></a><a href="dstemr.f.html#DSTEMR.1">DSTEMR</a> computes selected eigenvalues and, optionally, eigenvectors
</span><span class="comment">*</span><span class="comment">  of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
</span><span class="comment">*</span><span class="comment">  a well defined set of pairwise different real eigenvalues, the corresponding
</span><span class="comment">*</span><span class="comment">  real eigenvectors are pairwise orthogonal.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The spectrum may be computed either completely or partially by specifying
</span><span class="comment">*</span><span class="comment">  either an interval (VL,VU] or a range of indices IL:IU for the desired
</span><span class="comment">*</span><span class="comment">  eigenvalues.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Depending on the number of desired eigenvalues, these are computed either
</span><span class="comment">*</span><span class="comment">  by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are
</span><span class="comment">*</span><span class="comment">  computed by the use of various suitable L D L^T factorizations near clusters
</span><span class="comment">*</span><span class="comment">  of close eigenvalues (referred to as RRRs, Relatively Robust
</span><span class="comment">*</span><span class="comment">  Representations). An informal sketch of the algorithm follows.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  For each unreduced block (submatrix) of T,
</span><span class="comment">*</span><span class="comment">     (a) Compute T - sigma I  = L D L^T, so that L and D
</span><span class="comment">*</span><span class="comment">         define all the wanted eigenvalues to high relative accuracy.
</span><span class="comment">*</span><span class="comment">         This means that small relative changes in the entries of D and L
</span><span class="comment">*</span><span class="comment">         cause only small relative changes in the eigenvalues and
</span><span class="comment">*</span><span class="comment">         eigenvectors. The standard (unfactored) representation of the
</span><span class="comment">*</span><span class="comment">         tridiagonal matrix T does not have this property in general.
</span><span class="comment">*</span><span class="comment">     (b) Compute the eigenvalues to suitable accuracy.
</span><span class="comment">*</span><span class="comment">         If the eigenvectors are desired, the algorithm attains full
</span><span class="comment">*</span><span class="comment">         accuracy of the computed eigenvalues only right before
</span><span class="comment">*</span><span class="comment">         the corresponding vectors have to be computed, see steps c) and d).
</span><span class="comment">*</span><span class="comment">     (c) For each cluster of close eigenvalues, select a new
</span><span class="comment">*</span><span class="comment">         shift close to the cluster, find a new factorization, and refine
</span><span class="comment">*</span><span class="comment">         the shifted eigenvalues to suitable accuracy.
</span><span class="comment">*</span><span class="comment">     (d) For each eigenvalue with a large enough relative separation compute
</span><span class="comment">*</span><span class="comment">         the corresponding eigenvector by forming a rank revealing twisted
</span><span class="comment">*</span><span class="comment">         factorization. Go back to (c) for any clusters that remain.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  For more details, see:
</span><span class="comment">*</span><span class="comment">  - Inderjit S. Dhillon and Beresford N. Parlett: &quot;Multiple representations
</span><span class="comment">*</span><span class="comment">    to compute orthogonal eigenvectors of symmetric tridiagonal matrices,&quot;
</span><span class="comment">*</span><span class="comment">    Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
</span><span class="comment">*</span><span class="comment">  - Inderjit Dhillon and Beresford Parlett: &quot;Orthogonal Eigenvectors and
</span><span class="comment">*</span><span class="comment">    Relative Gaps,&quot; SIAM Journal on Matrix Analysis and Applications, Vol. 25,
</span><span class="comment">*</span><span class="comment">    2004.  Also LAPACK Working Note 154.
</span><span class="comment">*</span><span class="comment">  - Inderjit Dhillon: &quot;A new O(n^2) algorithm for the symmetric
</span><span class="comment">*</span><span class="comment">    tridiagonal eigenvalue/eigenvector problem&quot;,
</span><span class="comment">*</span><span class="comment">    Computer Science Division Technical Report No. UCB/CSD-97-971,
</span><span class="comment">*</span><span class="comment">    UC Berkeley, May 1997.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Notes:
</span><span class="comment">*</span><span class="comment">  1.<a name="DSTEMR.71"></a><a href="dstemr.f.html#DSTEMR.1">DSTEMR</a> works only on machines which follow IEEE-754
</span><span class="comment">*</span><span class="comment">  floating-point standard in their handling of infinities and NaNs.
</span><span class="comment">*</span><span class="comment">  This permits the use of efficient inner loops avoiding a check for
</span><span class="comment">*</span><span class="comment">  zero divisors.
</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">  JOBZ    (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'N':  Compute eigenvalues only;
</span><span class="comment">*</span><span class="comment">          = 'V':  Compute eigenvalues and eigenvectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RANGE   (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'A': all eigenvalues will be found.
</span><span class="comment">*</span><span class="comment">          = 'V': all eigenvalues in the half-open interval (VL,VU]
</span><span class="comment">*</span><span class="comment">                 will be found.
</span><span class="comment">*</span><span class="comment">          = 'I': the IL-th through IU-th eigenvalues will be found.
</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.  N &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  D       (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment">          On entry, the N diagonal elements of the tridiagonal matrix
</span><span class="comment">*</span><span class="comment">          T. On exit, D is overwritten.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  E       (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment">          On entry, the (N-1) subdiagonal elements of the tridiagonal
</span><span class="comment">*</span><span class="comment">          matrix T in elements 1 to N-1 of E. E(N) need not be set on
</span><span class="comment">*</span><span class="comment">          input, but is used internally as workspace.
</span><span class="comment">*</span><span class="comment">          On exit, E is overwritten.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  VL      (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment">  VU      (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment">          If RANGE='V', the lower and upper bounds of the interval to
</span><span class="comment">*</span><span class="comment">          be searched for eigenvalues. VL &lt; VU.
</span><span class="comment">*</span><span class="comment">          Not referenced if RANGE = 'A' or 'I'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  IL      (input) INTEGER
</span><span class="comment">*</span><span class="comment">  IU      (input) INTEGER
</span><span class="comment">*</span><span class="comment">          If RANGE='I', the indices (in ascending order) of the
</span><span class="comment">*</span><span class="comment">          smallest and largest eigenvalues to be returned.
</span><span class="comment">*</span><span class="comment">          1 &lt;= IL &lt;= IU &lt;= N, if N &gt; 0.
</span><span class="comment">*</span><span class="comment">          Not referenced if RANGE = 'A' or 'V'.
</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 total number of eigenvalues found.  0 &lt;= M &lt;= N.
</span><span class="comment">*</span><span class="comment">          If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  W       (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment">          The first M elements contain the selected eigenvalues in
</span><span class="comment">*</span><span class="comment">          ascending order.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Z       (output) DOUBLE PRECISION array, dimension (LDZ, max(1,M) )
</span><span class="comment">*</span><span class="comment">          If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
</span><span class="comment">*</span><span class="comment">          contain the orthonormal eigenvectors of the matrix T
</span><span class="comment">*</span><span class="comment">          corresponding to the selected eigenvalues, with the i-th
</span><span class="comment">*</span><span class="comment">          column of Z holding the eigenvector associated with W(i).
</span><span class="comment">*</span><span class="comment">          If JOBZ = 'N', then Z is not referenced.
</span><span class="comment">*</span><span class="comment">          Note: the user must ensure that at least max(1,M) columns are
</span><span class="comment">*</span><span class="comment">          supplied in the array Z; if RANGE = 'V', the exact value of M
</span><span class="comment">*</span><span class="comment">          is not known in advance and can be computed with a workspace
</span><span class="comment">*</span><span class="comment">          query by setting NZC = -1, see below.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDZ     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array Z.  LDZ &gt;= 1, and if
</span><span class="comment">*</span><span class="comment">          JOBZ = 'V', then LDZ &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  NZC     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of eigenvectors to be held in the array Z.
</span><span class="comment">*</span><span class="comment">          If RANGE = 'A', then NZC &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">          If RANGE = 'V', then NZC &gt;= the number of eigenvalues in (VL,VU].
</span><span class="comment">*</span><span class="comment">          If RANGE = 'I', then NZC &gt;= IU-IL+1.
</span><span class="comment">*</span><span class="comment">          If NZC = -1, then a workspace query is assumed; the
</span><span class="comment">*</span><span class="comment">          routine calculates the number of columns of the array Z that
</span><span class="comment">*</span><span class="comment">          are needed to hold the eigenvectors.
</span><span class="comment">*</span><span class="comment">          This value is returned as the first entry of the Z array, and
</span><span class="comment">*</span><span class="comment">          no error message related to NZC is issued by <a name="XERBLA.147"></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">  ISUPPZ  (output) INTEGER ARRAY, dimension ( 2*max(1,M) )

⌨️ 快捷键说明

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