dstevr.f.html

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

HTML
487
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>dstevr.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="DSTEVR.1"></a><a href="dstevr.f.html#DSTEVR.1">DSTEVR</a>( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
     $                   M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
     $                   LIWORK, 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          JOBZ, RANGE
      INTEGER            IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
      DOUBLE PRECISION   ABSTOL, 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( * ), 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="DSTEVR.22"></a><a href="dstevr.f.html#DSTEVR.1">DSTEVR</a> computes selected eigenvalues and, optionally, eigenvectors
</span><span class="comment">*</span><span class="comment">  of a real symmetric tridiagonal matrix T.  Eigenvalues and
</span><span class="comment">*</span><span class="comment">  eigenvectors can be selected by specifying either a range of values
</span><span class="comment">*</span><span class="comment">  or a range of indices for the desired eigenvalues.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Whenever possible, <a name="DSTEVR.27"></a><a href="dstevr.f.html#DSTEVR.1">DSTEVR</a> calls <a name="DSTEMR.27"></a><a href="dstemr.f.html#DSTEMR.1">DSTEMR</a> to compute the
</span><span class="comment">*</span><span class="comment">  eigenspectrum using Relatively Robust Representations.  <a name="DSTEMR.28"></a><a href="dstemr.f.html#DSTEMR.1">DSTEMR</a>
</span><span class="comment">*</span><span class="comment">  computes eigenvalues by the dqds algorithm, while orthogonal
</span><span class="comment">*</span><span class="comment">  eigenvectors are computed from various &quot;good&quot; L D L^T representations
</span><span class="comment">*</span><span class="comment">  (also known as Relatively Robust Representations). Gram-Schmidt
</span><span class="comment">*</span><span class="comment">  orthogonalization is avoided as far as possible. More specifically,
</span><span class="comment">*</span><span class="comment">  the various steps of the algorithm are as follows. For the i-th
</span><span class="comment">*</span><span class="comment">  unreduced block of T,
</span><span class="comment">*</span><span class="comment">     (a) Compute T - sigma_i = L_i D_i L_i^T, such that L_i D_i L_i^T
</span><span class="comment">*</span><span class="comment">          is a relatively robust representation,
</span><span class="comment">*</span><span class="comment">     (b) Compute the eigenvalues, lambda_j, of L_i D_i L_i^T to high
</span><span class="comment">*</span><span class="comment">         relative accuracy by the dqds algorithm,
</span><span class="comment">*</span><span class="comment">     (c) If there is a cluster of close eigenvalues, &quot;choose&quot; sigma_i
</span><span class="comment">*</span><span class="comment">         close to the cluster, and go to step (a),
</span><span class="comment">*</span><span class="comment">     (d) Given the approximate eigenvalue lambda_j of L_i D_i L_i^T,
</span><span class="comment">*</span><span class="comment">         compute the corresponding eigenvector by forming a
</span><span class="comment">*</span><span class="comment">         rank-revealing twisted factorization.
</span><span class="comment">*</span><span class="comment">  The desired accuracy of the output can be specified by the input
</span><span class="comment">*</span><span class="comment">  parameter ABSTOL.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  For more details, see &quot;A new O(n^2) algorithm for the symmetric
</span><span class="comment">*</span><span class="comment">  tridiagonal eigenvalue/eigenvector problem&quot;, by Inderjit Dhillon,
</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">
</span><span class="comment">*</span><span class="comment">  Note 1 : <a name="DSTEVR.53"></a><a href="dstevr.f.html#DSTEVR.1">DSTEVR</a> calls <a name="DSTEMR.53"></a><a href="dstemr.f.html#DSTEMR.1">DSTEMR</a> when the full spectrum is requested
</span><span class="comment">*</span><span class="comment">  on machines which conform to the ieee-754 floating point standard.
</span><span class="comment">*</span><span class="comment">  <a name="DSTEVR.55"></a><a href="dstevr.f.html#DSTEVR.1">DSTEVR</a> calls <a name="DSTEBZ.55"></a><a href="dstebz.f.html#DSTEBZ.1">DSTEBZ</a> and <a name="DSTEIN.55"></a><a href="dstein.f.html#DSTEIN.1">DSTEIN</a> on non-ieee machines and
</span><span class="comment">*</span><span class="comment">  when partial spectrum requests are made.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Normal execution of <a name="DSTEMR.58"></a><a href="dstemr.f.html#DSTEMR.1">DSTEMR</a> may create NaNs and infinities and
</span><span class="comment">*</span><span class="comment">  hence may abort due to a floating point exception in environments
</span><span class="comment">*</span><span class="comment">  which do not handle NaNs and infinities in the ieee standard default
</span><span class="comment">*</span><span class="comment">  manner.
</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">********* For RANGE = 'V' or 'I' and IU - IL &lt; N - 1, <a name="DSTEBZ.75"></a><a href="dstebz.f.html#DSTEBZ.1">DSTEBZ</a> and
</span><span class="comment">*</span><span class="comment">********* <a name="DSTEIN.76"></a><a href="dstein.f.html#DSTEIN.1">DSTEIN</a> are called
</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">          A.
</span><span class="comment">*</span><span class="comment">          On exit, D may be multiplied by a constant factor chosen
</span><span class="comment">*</span><span class="comment">          to avoid over/underflow in computing the eigenvalues.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  E       (input/output) DOUBLE PRECISION array, dimension (max(1,N-1))
</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 A in elements 1 to N-1 of E.
</span><span class="comment">*</span><span class="comment">          On exit, E may be multiplied by a constant factor chosen
</span><span class="comment">*</span><span class="comment">          to avoid over/underflow in computing the eigenvalues.
</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; IL = 1 and IU = 0 if N = 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">  ABSTOL  (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment">          The absolute error tolerance for the eigenvalues.
</span><span class="comment">*</span><span class="comment">          An approximate eigenvalue is accepted as converged
</span><span class="comment">*</span><span class="comment">          when it is determined to lie in an interval [a,b]
</span><span class="comment">*</span><span class="comment">          of width less than or equal to
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">                  ABSTOL + EPS *   max( |a|,|b| ) ,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          where EPS is the machine precision.  If ABSTOL is less than
</span><span class="comment">*</span><span class="comment">          or equal to zero, then  EPS*|T|  will be used in its place,
</span><span class="comment">*</span><span class="comment">          where |T| is the 1-norm of the tridiagonal matrix obtained
</span><span class="comment">*</span><span class="comment">          by reducing A to tridiagonal form.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          See &quot;Computing Small Singular Values of Bidiagonal Matrices
</span><span class="comment">*</span><span class="comment">          with Guaranteed High Relative Accuracy,&quot; by Demmel and
</span><span class="comment">*</span><span class="comment">          Kahan, LAPACK Working Note #3.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If high relative accuracy is important, set ABSTOL to
</span><span class="comment">*</span><span class="comment">          <a name="DLAMCH.124"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>( 'Safe minimum' ).  Doing so will guarantee that
</span><span class="comment">*</span><span class="comment">          eigenvalues are computed to high relative accuracy when
</span><span class="comment">*</span><span class="comment">          possible in future releases.  The current code does not
</span><span class="comment">*</span><span class="comment">          make any guarantees about high relative accuracy, but
</span><span class="comment">*</span><span class="comment">          future releases will. See J. Barlow and J. Demmel,
</span><span class="comment">*</span><span class="comment">          &quot;Computing Accurate Eigensystems of Scaled Diagonally
</span><span class="comment">*</span><span class="comment">          Dominant Matrices&quot;, LAPACK Working Note #7, for a discussion
</span><span class="comment">*</span><span class="comment">          of which matrices define their eigenvalues to high relative
</span><span class="comment">*</span><span class="comment">          accuracy.
</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', then if INFO = 0, the first M columns of Z
</span><span class="comment">*</span><span class="comment">          contain the orthonormal eigenvectors of the matrix A

⌨️ 快捷键说明

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