cstedc.f.html

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

HTML
428
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>cstedc.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="CSTEDC.1"></a><a href="cstedc.f.html#CSTEDC.1">CSTEDC</a>( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK,
     $                   LRWORK, 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">     .. Scalar Arguments ..
</span>      CHARACTER          COMPZ
      INTEGER            INFO, LDZ, LIWORK, LRWORK, LWORK, N
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      INTEGER            IWORK( * )
      REAL               D( * ), E( * ), RWORK( * )
      COMPLEX            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="CSTEDC.21"></a><a href="cstedc.f.html#CSTEDC.1">CSTEDC</a> computes all eigenvalues and, optionally, eigenvectors of a
</span><span class="comment">*</span><span class="comment">  symmetric tridiagonal matrix using the divide and conquer method.
</span><span class="comment">*</span><span class="comment">  The eigenvectors of a full or band complex Hermitian matrix can also
</span><span class="comment">*</span><span class="comment">  be found if <a name="CHETRD.24"></a><a href="chetrd.f.html#CHETRD.1">CHETRD</a> or <a name="CHPTRD.24"></a><a href="chptrd.f.html#CHPTRD.1">CHPTRD</a> or <a name="CHBTRD.24"></a><a href="chbtrd.f.html#CHBTRD.1">CHBTRD</a> has been used to reduce this
</span><span class="comment">*</span><span class="comment">  matrix to tridiagonal form.
</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.  See <a name="SLAED3.32"></a><a href="slaed3.f.html#SLAED3.1">SLAED3</a> for details.
</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">  COMPZ   (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'N':  Compute eigenvalues only.
</span><span class="comment">*</span><span class="comment">          = 'I':  Compute eigenvectors of tridiagonal matrix also.
</span><span class="comment">*</span><span class="comment">          = 'V':  Compute eigenvectors of original Hermitian matrix
</span><span class="comment">*</span><span class="comment">                  also.  On entry, Z contains the unitary matrix used
</span><span class="comment">*</span><span class="comment">                  to reduce the original matrix to tridiagonal form.
</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 dimension of the symmetric tridiagonal matrix.  N &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  D       (input/output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment">          On entry, the diagonal elements of the tridiagonal matrix.
</span><span class="comment">*</span><span class="comment">          On exit, if INFO = 0, the eigenvalues in ascending order.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  E       (input/output) REAL array, dimension (N-1)
</span><span class="comment">*</span><span class="comment">          On entry, the subdiagonal elements of the tridiagonal matrix.
</span><span class="comment">*</span><span class="comment">          On exit, E has been destroyed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Z       (input/output) COMPLEX array, dimension (LDZ,N)
</span><span class="comment">*</span><span class="comment">          On entry, if COMPZ = 'V', then Z contains the unitary
</span><span class="comment">*</span><span class="comment">          matrix used in the reduction to tridiagonal form.
</span><span class="comment">*</span><span class="comment">          On exit, if INFO = 0, then if COMPZ = 'V', Z contains the
</span><span class="comment">*</span><span class="comment">          orthonormal eigenvectors of the original Hermitian matrix,
</span><span class="comment">*</span><span class="comment">          and if COMPZ = 'I', Z contains the orthonormal eigenvectors
</span><span class="comment">*</span><span class="comment">          of the symmetric tridiagonal matrix.
</span><span class="comment">*</span><span class="comment">          If  COMPZ = 'N', then Z is not referenced.
</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.
</span><span class="comment">*</span><span class="comment">          If eigenvectors are desired, then LDZ &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  WORK    (workspace/output) COMPLEX    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 COMPZ = 'N' or 'I', or N &lt;= 1, LWORK must be at least 1.
</span><span class="comment">*</span><span class="comment">          If COMPZ = 'V' and N &gt; 1, LWORK must be at least N*N.
</span><span class="comment">*</span><span class="comment">          Note that for COMPZ = 'V', then if N is less than or
</span><span class="comment">*</span><span class="comment">          equal to the minimum divide size, usually 25, then LWORK need
</span><span class="comment">*</span><span class="comment">          only be 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 sizes of the WORK, RWORK and
</span><span class="comment">*</span><span class="comment">          IWORK arrays, returns these values as the first entries of
</span><span class="comment">*</span><span class="comment">          the WORK, RWORK and IWORK arrays, and no error message
</span><span class="comment">*</span><span class="comment">          related to LWORK or LRWORK or LIWORK is issued by <a name="XERBLA.83"></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">  RWORK   (workspace/output) REAL array, dimension (MAX(1,LRWORK))
</span><span class="comment">*</span><span class="comment">          On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LRWORK  (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The dimension of the array RWORK.
</span><span class="comment">*</span><span class="comment">          If COMPZ = 'N' or N &lt;= 1, LRWORK must be at least 1.
</span><span class="comment">*</span><span class="comment">          If COMPZ = 'V' and N &gt; 1, LRWORK must be at least
</span><span class="comment">*</span><span class="comment">                         1 + 3*N + 2*N*lg N + 3*N**2 ,
</span><span class="comment">*</span><span class="comment">                         where lg( N ) = smallest integer k such
</span><span class="comment">*</span><span class="comment">                         that 2**k &gt;= N.
</span><span class="comment">*</span><span class="comment">          If COMPZ = 'I' and N &gt; 1, LRWORK must be at least
</span><span class="comment">*</span><span class="comment">                         1 + 4*N + 2*N**2 .
</span><span class="comment">*</span><span class="comment">          Note that for COMPZ = 'I' or 'V', then if N is less than or
</span><span class="comment">*</span><span class="comment">          equal to the minimum divide size, usually 25, then LRWORK
</span><span class="comment">*</span><span class="comment">          need only be max(1,2*(N-1)).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If LRWORK = -1, then a workspace query is assumed; the
</span><span class="comment">*</span><span class="comment">          routine only calculates the optimal sizes of the WORK, RWORK
</span><span class="comment">*</span><span class="comment">          and IWORK arrays, returns these values as the first entries
</span><span class="comment">*</span><span class="comment">          of the WORK, RWORK and IWORK arrays, and no error message
</span><span class="comment">*</span><span class="comment">          related to LWORK or LRWORK or LIWORK is issued by <a name="XERBLA.105"></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/output) 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 COMPZ = 'N' or N &lt;= 1, LIWORK must be at least 1.
</span><span class="comment">*</span><span class="comment">          If COMPZ = 'V' or N &gt; 1,  LIWORK must be at least
</span><span class="comment">*</span><span class="comment">                                    6 + 6*N + 5*N*lg N.
</span><span class="comment">*</span><span class="comment">          If COMPZ = 'I' or N &gt; 1,  LIWORK must be at least
</span><span class="comment">*</span><span class="comment">                                    3 + 5*N .
</span><span class="comment">*</span><span class="comment">          Note that for COMPZ = 'I' or 'V', then if N is less than or
</span><span class="comment">*</span><span class="comment">          equal to the minimum divide size, usually 25, then LIWORK
</span><span class="comment">*</span><span class="comment">          need only be 1.
</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 sizes of the WORK, RWORK
</span><span class="comment">*</span><span class="comment">          and IWORK arrays, returns these values as the first entries
</span><span class="comment">*</span><span class="comment">          of the WORK, RWORK and IWORK arrays, and no error message

⌨️ 快捷键说明

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