zptsvx.f.html

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

HTML
261
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>zptsvx.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="ZPTSVX.1"></a><a href="zptsvx.f.html#ZPTSVX.1">ZPTSVX</a>( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX,
     $                   RCOND, FERR, BERR, WORK, RWORK, 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          FACT
      INTEGER            INFO, LDB, LDX, N, NRHS
      DOUBLE PRECISION   RCOND
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      DOUBLE PRECISION   BERR( * ), D( * ), DF( * ), FERR( * ),
     $                   RWORK( * )
      COMPLEX*16         B( LDB, * ), E( * ), EF( * ), WORK( * ),
     $                   X( LDX, * )
<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="ZPTSVX.23"></a><a href="zptsvx.f.html#ZPTSVX.1">ZPTSVX</a> uses the factorization A = L*D*L**H to compute the solution
</span><span class="comment">*</span><span class="comment">  to a complex system of linear equations A*X = B, where A is an
</span><span class="comment">*</span><span class="comment">  N-by-N Hermitian positive definite tridiagonal matrix and X and B
</span><span class="comment">*</span><span class="comment">  are N-by-NRHS matrices.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Error bounds on the solution and a condition estimate are also
</span><span class="comment">*</span><span class="comment">  provided.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Description
</span><span class="comment">*</span><span class="comment">  ===========
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The following steps are performed:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  1. If FACT = 'N', the matrix A is factored as A = L*D*L**H, where L
</span><span class="comment">*</span><span class="comment">     is a unit lower bidiagonal matrix and D is diagonal.  The
</span><span class="comment">*</span><span class="comment">     factorization can also be regarded as having the form
</span><span class="comment">*</span><span class="comment">     A = U**H*D*U.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  2. If the leading i-by-i principal minor is not positive definite,
</span><span class="comment">*</span><span class="comment">     then the routine returns with INFO = i. Otherwise, the factored
</span><span class="comment">*</span><span class="comment">     form of A is used to estimate the condition number of the matrix
</span><span class="comment">*</span><span class="comment">     A.  If the reciprocal of the condition number is less than machine
</span><span class="comment">*</span><span class="comment">     precision, INFO = N+1 is returned as a warning, but the routine
</span><span class="comment">*</span><span class="comment">     still goes on to solve for X and compute error bounds as
</span><span class="comment">*</span><span class="comment">     described below.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  3. The system of equations is solved for X using the factored form
</span><span class="comment">*</span><span class="comment">     of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  4. Iterative refinement is applied to improve the computed solution
</span><span class="comment">*</span><span class="comment">     matrix and calculate error bounds and backward error estimates
</span><span class="comment">*</span><span class="comment">     for it.
</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">  FACT    (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          Specifies whether or not the factored form of the matrix
</span><span class="comment">*</span><span class="comment">          A is supplied on entry.
</span><span class="comment">*</span><span class="comment">          = 'F':  On entry, DF and EF contain the factored form of A.
</span><span class="comment">*</span><span class="comment">                  D, E, DF, and EF will not be modified.
</span><span class="comment">*</span><span class="comment">          = 'N':  The matrix A will be copied to DF and EF and
</span><span class="comment">*</span><span class="comment">                  factored.
</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 A.  N &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  NRHS    (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of right hand sides, i.e., the number of columns
</span><span class="comment">*</span><span class="comment">          of the matrices B and X.  NRHS &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  D       (input) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment">          The n diagonal elements of the tridiagonal matrix A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  E       (input) COMPLEX*16 array, dimension (N-1)
</span><span class="comment">*</span><span class="comment">          The (n-1) subdiagonal elements of the tridiagonal matrix A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  DF      (input or output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment">          If FACT = 'F', then DF is an input argument and on entry
</span><span class="comment">*</span><span class="comment">          contains the n diagonal elements of the diagonal matrix D
</span><span class="comment">*</span><span class="comment">          from the L*D*L**H factorization of A.
</span><span class="comment">*</span><span class="comment">          If FACT = 'N', then DF is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          contains the n diagonal elements of the diagonal matrix D
</span><span class="comment">*</span><span class="comment">          from the L*D*L**H factorization of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  EF      (input or output) COMPLEX*16 array, dimension (N-1)
</span><span class="comment">*</span><span class="comment">          If FACT = 'F', then EF is an input argument and on entry
</span><span class="comment">*</span><span class="comment">          contains the (n-1) subdiagonal elements of the unit
</span><span class="comment">*</span><span class="comment">          bidiagonal factor L from the L*D*L**H factorization of A.
</span><span class="comment">*</span><span class="comment">          If FACT = 'N', then EF is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          contains the (n-1) subdiagonal elements of the unit
</span><span class="comment">*</span><span class="comment">          bidiagonal factor L from the L*D*L**H factorization of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  B       (input) COMPLEX*16 array, dimension (LDB,NRHS)
</span><span class="comment">*</span><span class="comment">          The N-by-NRHS right hand side matrix B.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDB     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array B.  LDB &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  X       (output) COMPLEX*16 array, dimension (LDX,NRHS)
</span><span class="comment">*</span><span class="comment">          If INFO = 0 or INFO = N+1, the N-by-NRHS solution matrix X.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDX     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array X.  LDX &gt;= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RCOND   (output) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment">          The reciprocal condition number of the matrix A.  If RCOND
</span><span class="comment">*</span><span class="comment">          is less than the machine precision (in particular, if
</span><span class="comment">*</span><span class="comment">          RCOND = 0), the matrix is singular to working precision.
</span><span class="comment">*</span><span class="comment">          This condition is indicated by a return code of INFO &gt; 0.

⌨️ 快捷键说明

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