cppsvx.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 406 行 · 第 1/3 页
HTML
406 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>cppsvx.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="CPPSVX.1"></a><a href="cppsvx.f.html#CPPSVX.1">CPPSVX</a>( FACT, UPLO, N, NRHS, AP, AFP, EQUED, S, 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 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 EQUED, 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> REAL BERR( * ), FERR( * ), RWORK( * ), S( * )
COMPLEX AFP( * ), AP( * ), B( LDB, * ), 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="CPPSVX.22"></a><a href="cppsvx.f.html#CPPSVX.1">CPPSVX</a> uses the Cholesky factorization A = U**H*U or A = L*L**H to
</span><span class="comment">*</span><span class="comment"> compute the solution to a complex system of linear equations
</span><span class="comment">*</span><span class="comment"> A * X = B,
</span><span class="comment">*</span><span class="comment"> where A is an N-by-N Hermitian positive definite matrix stored in
</span><span class="comment">*</span><span class="comment"> 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 = 'E', real scaling factors are computed to equilibrate
</span><span class="comment">*</span><span class="comment"> the system:
</span><span class="comment">*</span><span class="comment"> diag(S) * A * diag(S) * inv(diag(S)) * X = diag(S) * B
</span><span class="comment">*</span><span class="comment"> Whether or not the system will be equilibrated depends on the
</span><span class="comment">*</span><span class="comment"> scaling of the matrix A, but if equilibration is used, A is
</span><span class="comment">*</span><span class="comment"> overwritten by diag(S)*A*diag(S) and B by diag(S)*B.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> 2. If FACT = 'N' or 'E', the Cholesky decomposition is used to
</span><span class="comment">*</span><span class="comment"> factor the matrix A (after equilibration if FACT = 'E') as
</span><span class="comment">*</span><span class="comment"> A = U'* U , if UPLO = 'U', or
</span><span class="comment">*</span><span class="comment"> A = L * L', if UPLO = 'L',
</span><span class="comment">*</span><span class="comment"> where U is an upper triangular matrix, L is a lower triangular
</span><span class="comment">*</span><span class="comment"> matrix, and ' indicates conjugate transpose.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> 3. 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"> 4. 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"> 5. 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"> 6. If equilibration was used, the matrix X is premultiplied by
</span><span class="comment">*</span><span class="comment"> diag(S) so that it solves the original system before
</span><span class="comment">*</span><span class="comment"> equilibration.
</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 A is
</span><span class="comment">*</span><span class="comment"> supplied on entry, and if not, whether the matrix A should be
</span><span class="comment">*</span><span class="comment"> equilibrated before it is factored.
</span><span class="comment">*</span><span class="comment"> = 'F': On entry, AFP contains the factored form of A.
</span><span class="comment">*</span><span class="comment"> If EQUED = 'Y', the matrix A has been equilibrated
</span><span class="comment">*</span><span class="comment"> with scaling factors given by S. AP and AFP will not
</span><span class="comment">*</span><span class="comment"> 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"> = 'E': The matrix A will be equilibrated if necessary, then
</span><span class="comment">*</span><span class="comment"> 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 >= 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 >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> AP (input/output) COMPLEX array, dimension (N*(N+1)/2)
</span><span class="comment">*</span><span class="comment"> On entry, the upper or lower triangle of the Hermitian matrix
</span><span class="comment">*</span><span class="comment"> A, packed columnwise in a linear array, except if FACT = 'F'
</span><span class="comment">*</span><span class="comment"> and EQUED = 'Y', then A must contain the equilibrated matrix
</span><span class="comment">*</span><span class="comment"> diag(S)*A*diag(S). The j-th column of A is stored in the
</span><span class="comment">*</span><span class="comment"> 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<=i<=j;
</span><span class="comment">*</span><span class="comment"> if UPLO = 'L', AP(i + (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n.
</span><span class="comment">*</span><span class="comment"> See below for further details. A is not modified if
</span><span class="comment">*</span><span class="comment"> FACT = 'F' or 'N', or if FACT = 'E' and EQUED = 'N' on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> On exit, if FACT = 'E' and EQUED = 'Y', A is overwritten by
</span><span class="comment">*</span><span class="comment"> diag(S)*A*diag(S).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> AFP (input or output) COMPLEX array, dimension (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 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, in the same storage
</span><span class="comment">*</span><span class="comment"> format as A. If EQUED .ne. 'N', then AFP is the factored
</span><span class="comment">*</span><span class="comment"> form of the equilibrated matrix 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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?