sspsvx.f.html

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

HTML
302
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>sspsvx.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="SSPSVX.1"></a><a href="sspsvx.f.html#SSPSVX.1">SSPSVX</a>( FACT, UPLO, N, NRHS, AP, AFP, IPIV, B, LDB, X,
     $                   LDX, RCOND, FERR, BERR, WORK, IWORK, 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          FACT, UPLO
      INTEGER            INFO, LDB, LDX, N, NRHS
      REAL               RCOND
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      INTEGER            IPIV( * ), IWORK( * )
      REAL               AFP( * ), AP( * ), B( LDB, * ), BERR( * ),
     $                   FERR( * ), 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="SSPSVX.22"></a><a href="sspsvx.f.html#SSPSVX.1">SSPSVX</a> uses the diagonal pivoting factorization A = U*D*U**T or
</span><span class="comment">*</span><span class="comment">  A = L*D*L**T to compute the solution to a real system of linear
</span><span class="comment">*</span><span class="comment">  equations A * X = B, where A is an N-by-N symmetric matrix stored
</span><span class="comment">*</span><span class="comment">  in packed format and X and B 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 diagonal pivoting method is used to factor A as
</span><span class="comment">*</span><span class="comment">        A = U * D * U**T,  if UPLO = 'U', or
</span><span class="comment">*</span><span class="comment">        A = L * D * L**T,  if UPLO = 'L',
</span><span class="comment">*</span><span class="comment">     where U (or L) is a product of permutation and unit upper (lower)
</span><span class="comment">*</span><span class="comment">     triangular matrices and D is symmetric and block diagonal with
</span><span class="comment">*</span><span class="comment">     1-by-1 and 2-by-2 diagonal blocks.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  2. If some D(i,i)=0, so that D is exactly singular, then the routine
</span><span class="comment">*</span><span class="comment">     returns with INFO = i. Otherwise, the factored form of A is used
</span><span class="comment">*</span><span class="comment">     to estimate the condition number of the matrix A.  If the
</span><span class="comment">*</span><span class="comment">     reciprocal of the condition number is less than machine precision,
</span><span class="comment">*</span><span class="comment">     INFO = N+1 is returned as a warning, but the routine still goes on
</span><span class="comment">*</span><span class="comment">     to solve for X and compute error bounds as 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 A has been
</span><span class="comment">*</span><span class="comment">          supplied on entry.
</span><span class="comment">*</span><span class="comment">          = 'F':  On entry, AFP and IPIV contain the factored form of
</span><span class="comment">*</span><span class="comment">                  A.  AP, AFP and IPIV will not be modified.
</span><span class="comment">*</span><span class="comment">          = 'N':  The matrix A will be copied to AFP and factored.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  UPLO    (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'U':  Upper triangle of A is stored;
</span><span class="comment">*</span><span class="comment">          = 'L':  Lower triangle of A is stored.
</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 number of linear equations, i.e., the order of the
</span><span class="comment">*</span><span class="comment">          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">  AP      (input) REAL array, dimension (N*(N+1)/2)
</span><span class="comment">*</span><span class="comment">          The upper or lower triangle of the symmetric matrix A, packed
</span><span class="comment">*</span><span class="comment">          columnwise in a linear array.  The j-th column of A is stored
</span><span class="comment">*</span><span class="comment">          in the array AP as follows:
</span><span class="comment">*</span><span class="comment">          if UPLO = 'U', AP(i + (j-1)*j/2) = A(i,j) for 1&lt;=i&lt;=j;
</span><span class="comment">*</span><span class="comment">          if UPLO = 'L', AP(i + (j-1)*(2*n-j)/2) = A(i,j) for j&lt;=i&lt;=n.
</span><span class="comment">*</span><span class="comment">          See below for further details.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  AFP     (input or output) REAL array, dimension
</span><span class="comment">*</span><span class="comment">                            (N*(N+1)/2)
</span><span class="comment">*</span><span class="comment">          If FACT = 'F', then AFP is an input argument and on entry
</span><span class="comment">*</span><span class="comment">          contains the block diagonal matrix D and the multipliers used
</span><span class="comment">*</span><span class="comment">          to obtain the factor U or L from the factorization
</span><span class="comment">*</span><span class="comment">          A = U*D*U**T or A = L*D*L**T as computed by <a name="SSPTRF.91"></a><a href="ssptrf.f.html#SSPTRF.1">SSPTRF</a>, stored as
</span><span class="comment">*</span><span class="comment">          a packed triangular matrix in the same storage format as A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If FACT = 'N', then AFP is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          contains the block diagonal matrix D and the multipliers used
</span><span class="comment">*</span><span class="comment">          to obtain the factor U or L from the factorization
</span><span class="comment">*</span><span class="comment">          A = U*D*U**T or A = L*D*L**T as computed by <a name="SSPTRF.97"></a><a href="ssptrf.f.html#SSPTRF.1">SSPTRF</a>, stored as
</span><span class="comment">*</span><span class="comment">          a packed triangular matrix in the same storage format as A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  IPIV    (input or output) INTEGER array, dimension (N)
</span><span class="comment">*</span><span class="comment">          If FACT = 'F', then IPIV is an input argument and on entry
</span><span class="comment">*</span><span class="comment">          contains details of the interchanges and the block structure
</span><span class="comment">*</span><span class="comment">          of D, as determined by <a name="SSPTRF.103"></a><a href="ssptrf.f.html#SSPTRF.1">SSPTRF</a>.
</span><span class="comment">*</span><span class="comment">          If IPIV(k) &gt; 0, then rows and columns k and IPIV(k) were
</span><span class="comment">*</span><span class="comment">          interchanged and D(k,k) is a 1-by-1 diagonal block.
</span><span class="comment">*</span><span class="comment">          If UPLO = 'U' and IPIV(k) = IPIV(k-1) &lt; 0, then rows and
</span><span class="comment">*</span><span class="comment">          columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k)
</span><span class="comment">*</span><span class="comment">          is a 2-by-2 diagonal block.  If UPLO = 'L' and IPIV(k) =
</span><span class="comment">*</span><span class="comment">          IPIV(k+1) &lt; 0, then rows and columns k+1 and -IPIV(k) were
</span><span class="comment">*</span><span class="comment">          interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If FACT = 'N', then IPIV is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          contains details of the interchanges and the block structure
</span><span class="comment">*</span><span class="comment">          of D, as determined by <a name="SSPTRF.114"></a><a href="ssptrf.f.html#SSPTRF.1">SSPTRF</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  B       (input) REAL 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) REAL 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) REAL
</span><span class="comment">*</span><span class="comment">          The estimate of the reciprocal condition number of the matrix
</span><span class="comment">*</span><span class="comment">          A.  If RCOND is less than the machine precision (in
</span><span class="comment">*</span><span class="comment">          particular, if RCOND = 0), the matrix is singular to working
</span><span class="comment">*</span><span class="comment">          precision.  This condition is indicated by a return code of

⌨️ 快捷键说明

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