cpteqr.f.html

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

HTML
215
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>cpteqr.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="CPTEQR.1"></a><a href="cpteqr.f.html#CPTEQR.1">CPTEQR</a>( COMPZ, N, D, E, Z, LDZ, WORK, 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, N
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      REAL               D( * ), E( * ), WORK( * )
      COMPLEX            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="CPTEQR.19"></a><a href="cpteqr.f.html#CPTEQR.1">CPTEQR</a> computes all eigenvalues and, optionally, eigenvectors of a
</span><span class="comment">*</span><span class="comment">  symmetric positive definite tridiagonal matrix by first factoring the
</span><span class="comment">*</span><span class="comment">  matrix using <a name="SPTTRF.21"></a><a href="spttrf.f.html#SPTTRF.1">SPTTRF</a> and then calling <a name="CBDSQR.21"></a><a href="cbdsqr.f.html#CBDSQR.1">CBDSQR</a> to compute the singular
</span><span class="comment">*</span><span class="comment">  values of the bidiagonal factor.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  This routine computes the eigenvalues of the positive definite
</span><span class="comment">*</span><span class="comment">  tridiagonal matrix to high relative accuracy.  This means that if the
</span><span class="comment">*</span><span class="comment">  eigenvalues range over many orders of magnitude in size, then the
</span><span class="comment">*</span><span class="comment">  small eigenvalues and corresponding eigenvectors will be computed
</span><span class="comment">*</span><span class="comment">  more accurately than, for example, with the standard QR method.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The eigenvectors of a full or band positive definite Hermitian matrix
</span><span class="comment">*</span><span class="comment">  can also be found if <a name="CHETRD.31"></a><a href="chetrd.f.html#CHETRD.1">CHETRD</a>, <a name="CHPTRD.31"></a><a href="chptrd.f.html#CHPTRD.1">CHPTRD</a>, or <a name="CHBTRD.31"></a><a href="chbtrd.f.html#CHBTRD.1">CHBTRD</a> has been used to
</span><span class="comment">*</span><span class="comment">  reduce this matrix to tridiagonal form.  (The reduction to
</span><span class="comment">*</span><span class="comment">  tridiagonal form, however, may preclude the possibility of obtaining
</span><span class="comment">*</span><span class="comment">  high relative accuracy in the small eigenvalues of the original
</span><span class="comment">*</span><span class="comment">  matrix, if these eigenvalues range over many orders of magnitude.)
</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">          = 'V':  Compute eigenvectors of original Hermitian
</span><span class="comment">*</span><span class="comment">                  matrix also.  Array Z contains the unitary matrix
</span><span class="comment">*</span><span class="comment">                  used to reduce the original matrix to tridiagonal
</span><span class="comment">*</span><span class="comment">                  form.
</span><span class="comment">*</span><span class="comment">          = 'I':  Compute eigenvectors of tridiagonal matrix also.
</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) REAL 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">          On normal exit, D contains the eigenvalues, in descending
</span><span class="comment">*</span><span class="comment">          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 (n-1) subdiagonal elements of the tridiagonal
</span><span class="comment">*</span><span class="comment">          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', the unitary matrix used in the
</span><span class="comment">*</span><span class="comment">          reduction to tridiagonal form.
</span><span class="comment">*</span><span class="comment">          On exit, if COMPZ = 'V', the orthonormal eigenvectors of the
</span><span class="comment">*</span><span class="comment">          original Hermitian matrix;
</span><span class="comment">*</span><span class="comment">          if COMPZ = 'I', the orthonormal eigenvectors of the
</span><span class="comment">*</span><span class="comment">          tridiagonal matrix.
</span><span class="comment">*</span><span class="comment">          If INFO &gt; 0 on exit, Z contains the eigenvectors associated
</span><span class="comment">*</span><span class="comment">          with only the stored eigenvalues.
</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, and if
</span><span class="comment">*</span><span class="comment">          COMPZ = 'V' or 'I', LDZ &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  WORK    (workspace) REAL array, dimension (4*N)
</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 = i, and i is:
</span><span class="comment">*</span><span class="comment">                &lt;= N  the Cholesky factorization of the matrix could
</span><span class="comment">*</span><span class="comment">                      not be performed because the i-th principal minor
</span><span class="comment">*</span><span class="comment">                      was not positive definite.
</span><span class="comment">*</span><span class="comment">                &gt; N   the SVD algorithm failed to converge;
</span><span class="comment">*</span><span class="comment">                      if INFO = N+i, i off-diagonal elements of the
</span><span class="comment">*</span><span class="comment">                      bidiagonal factor did not converge to zero.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  ====================================================================

⌨️ 快捷键说明

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