cppsvx.f.html

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

HTML
406
字号
</span><span class="comment">*</span><span class="comment">          returns the triangular factor U or L from the Cholesky
</span><span class="comment">*</span><span class="comment">          factorization A = U**H*U or A = L*L**H of the original
</span><span class="comment">*</span><span class="comment">          matrix A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">          If FACT = 'E', then AFP is an output argument and on exit
</span><span class="comment">*</span><span class="comment">          returns the triangular factor U or L from the Cholesky
</span><span class="comment">*</span><span class="comment">          factorization A = U**H*U or A = L*L**H of the equilibrated
</span><span class="comment">*</span><span class="comment">          matrix A (see the description of AP for the form of the
</span><span class="comment">*</span><span class="comment">          equilibrated matrix).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  EQUED   (input or output) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          Specifies the form of equilibration that was done.
</span><span class="comment">*</span><span class="comment">          = 'N':  No equilibration (always true if FACT = 'N').
</span><span class="comment">*</span><span class="comment">          = 'Y':  Equilibration was done, i.e., A has been replaced by
</span><span class="comment">*</span><span class="comment">                  diag(S) * A * diag(S).
</span><span class="comment">*</span><span class="comment">          EQUED is an input argument if FACT = 'F'; otherwise, it is an
</span><span class="comment">*</span><span class="comment">          output argument.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  S       (input or output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment">          The scale factors for A; not accessed if EQUED = 'N'.  S is
</span><span class="comment">*</span><span class="comment">          an input argument if FACT = 'F'; otherwise, S is an output
</span><span class="comment">*</span><span class="comment">          argument.  If FACT = 'F' and EQUED = 'Y', each element of S
</span><span class="comment">*</span><span class="comment">          must be positive.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  B       (input/output) COMPLEX array, dimension (LDB,NRHS)
</span><span class="comment">*</span><span class="comment">          On entry, the N-by-NRHS right hand side matrix B.
</span><span class="comment">*</span><span class="comment">          On exit, if EQUED = 'N', B is not modified; if EQUED = 'Y',
</span><span class="comment">*</span><span class="comment">          B is overwritten by diag(S) * 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 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 to
</span><span class="comment">*</span><span class="comment">          the original system of equations.  Note that if EQUED = 'Y',
</span><span class="comment">*</span><span class="comment">          A and B are modified on exit, and the solution to the
</span><span class="comment">*</span><span class="comment">          equilibrated system is inv(diag(S))*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 after equilibration (if done).  If RCOND is less than the
</span><span class="comment">*</span><span class="comment">          machine precision (in particular, if RCOND = 0), the matrix
</span><span class="comment">*</span><span class="comment">          is singular to working precision.  This condition is
</span><span class="comment">*</span><span class="comment">          indicated by a return code of INFO &gt; 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  FERR    (output) REAL array, dimension (NRHS)
</span><span class="comment">*</span><span class="comment">          The estimated forward error bound for each solution vector
</span><span class="comment">*</span><span class="comment">          X(j) (the j-th column of the solution matrix X).
</span><span class="comment">*</span><span class="comment">          If XTRUE is the true solution corresponding to X(j), FERR(j)
</span><span class="comment">*</span><span class="comment">          is an estimated upper bound for the magnitude of the largest
</span><span class="comment">*</span><span class="comment">          element in (X(j) - XTRUE) divided by the magnitude of the
</span><span class="comment">*</span><span class="comment">          largest element in X(j).  The estimate is as reliable as
</span><span class="comment">*</span><span class="comment">          the estimate for RCOND, and is almost always a slight
</span><span class="comment">*</span><span class="comment">          overestimate of the true error.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  BERR    (output) REAL array, dimension (NRHS)
</span><span class="comment">*</span><span class="comment">          The componentwise relative backward error of each solution
</span><span class="comment">*</span><span class="comment">          vector X(j) (i.e., the smallest relative change in
</span><span class="comment">*</span><span class="comment">          any element of A or B that makes X(j) an exact solution).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  WORK    (workspace) COMPLEX array, dimension (2*N)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RWORK   (workspace) REAL array, dimension (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 leading minor of order i of A is
</span><span class="comment">*</span><span class="comment">                       not positive definite, so the factorization
</span><span class="comment">*</span><span class="comment">                       could not be completed, and the solution has not
</span><span class="comment">*</span><span class="comment">                       been computed. RCOND = 0 is returned.
</span><span class="comment">*</span><span class="comment">                = N+1: U is nonsingular, but RCOND is less than machine
</span><span class="comment">*</span><span class="comment">                       precision, meaning that the matrix is singular
</span><span class="comment">*</span><span class="comment">                       to working precision.  Nevertheless, the
</span><span class="comment">*</span><span class="comment">                       solution and error bounds are computed because
</span><span class="comment">*</span><span class="comment">                       there are a number of situations where the
</span><span class="comment">*</span><span class="comment">                       computed solution can be more accurate than the
</span><span class="comment">*</span><span class="comment">                       value of RCOND would suggest.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Further Details
</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 packed storage scheme is illustrated by the following example
</span><span class="comment">*</span><span class="comment">  when N = 4, UPLO = 'U':
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Two-dimensional storage of the Hermitian matrix A:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     a11 a12 a13 a14
</span><span class="comment">*</span><span class="comment">         a22 a23 a24
</span><span class="comment">*</span><span class="comment">             a33 a34     (aij = conjg(aji))
</span><span class="comment">*</span><span class="comment">                 a44
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Packed storage of the upper triangle of A:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  =====================================================================
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Parameters ..
</span>      REAL               ZERO, ONE
      PARAMETER          ( ZERO = 0.0E+0, ONE = 1.0E+0 )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      LOGICAL            EQUIL, NOFACT, RCEQU
      INTEGER            I, INFEQU, J
      REAL               AMAX, ANORM, BIGNUM, SCOND, SMAX, SMIN, SMLNUM
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      LOGICAL            <a name="LSAME.230"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
      REAL               <a name="CLANHP.231"></a><a href="clanhp.f.html#CLANHP.1">CLANHP</a>, <a name="SLAMCH.231"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>
      EXTERNAL           <a name="LSAME.232"></a><a href="lsame.f.html#LSAME.1">LSAME</a>, <a name="CLANHP.232"></a><a href="clanhp.f.html#CLANHP.1">CLANHP</a>, <a name="SLAMCH.232"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Subroutines ..
</span>      EXTERNAL           CCOPY, <a name="CLACPY.235"></a><a href="clacpy.f.html#CLACPY.1">CLACPY</a>, <a name="CLAQHP.235"></a><a href="claqhp.f.html#CLAQHP.1">CLAQHP</a>, <a name="CPPCON.235"></a><a href="cppcon.f.html#CPPCON.1">CPPCON</a>, <a name="CPPEQU.235"></a><a href="cppequ.f.html#CPPEQU.1">CPPEQU</a>, <a name="CPPRFS.235"></a><a href="cpprfs.f.html#CPPRFS.1">CPPRFS</a>,
     $                   <a name="CPPTRF.236"></a><a href="cpptrf.f.html#CPPTRF.1">CPPTRF</a>, <a name="CPPTRS.236"></a><a href="cpptrs.f.html#CPPTRS.1">CPPTRS</a>, <a name="XERBLA.236"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC          MAX, MIN
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span>      INFO = 0
      NOFACT = <a name="LSAME.244"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( FACT, <span class="string">'N'</span> )
      EQUIL = <a name="LSAME.245"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( FACT, <span class="string">'E'</span> )
      IF( NOFACT .OR. EQUIL ) THEN
         EQUED = <span class="string">'N'</span>
         RCEQU = .FALSE.
      ELSE
         RCEQU = <a name="LSAME.250"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( EQUED, <span class="string">'Y'</span> )
         SMLNUM = <a name="SLAMCH.251"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>( <span class="string">'Safe minimum'</span> )
         BIGNUM = ONE / SMLNUM
      END IF

⌨️ 快捷键说明

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