dposvx.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 402 行 · 第 1/3 页
HTML
402 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dposvx.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="DPOSVX.1"></a><a href="dposvx.f.html#DPOSVX.1">DPOSVX</a>( FACT, UPLO, N, NRHS, A, LDA, AF, LDAF, EQUED,
$ S, 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 EQUED, FACT, UPLO
INTEGER INFO, LDA, LDAF, 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> INTEGER IWORK( * )
DOUBLE PRECISION A( LDA, * ), AF( LDAF, * ), B( LDB, * ),
$ BERR( * ), FERR( * ), S( * ), 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="DPOSVX.24"></a><a href="dposvx.f.html#DPOSVX.1">DPOSVX</a> uses the Cholesky factorization A = U**T*U or A = L*L**T to
</span><span class="comment">*</span><span class="comment"> compute the solution to a real 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 symmetric positive definite 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 = '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**T* U, if UPLO = 'U', or
</span><span class="comment">*</span><span class="comment"> A = L * L**T, if UPLO = 'L',
</span><span class="comment">*</span><span class="comment"> where U is an upper triangular matrix and L is a lower triangular
</span><span class="comment">*</span><span class="comment"> matrix.
</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, AF 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. A and AF 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 AF 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 AF 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"> A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
</span><span class="comment">*</span><span class="comment"> On entry, the symmetric matrix A, except if FACT = 'F' and
</span><span class="comment">*</span><span class="comment"> EQUED = 'Y', then A must contain the equilibrated matrix
</span><span class="comment">*</span><span class="comment"> diag(S)*A*diag(S). If UPLO = 'U', the leading
</span><span class="comment">*</span><span class="comment"> N-by-N upper triangular part of A contains the upper
</span><span class="comment">*</span><span class="comment"> triangular part of the matrix A, and the strictly lower
</span><span class="comment">*</span><span class="comment"> triangular part of A is not referenced. If UPLO = 'L', the
</span><span class="comment">*</span><span class="comment"> leading N-by-N lower triangular part of A contains the lower
</span><span class="comment">*</span><span class="comment"> triangular part of the matrix A, and the strictly upper
</span><span class="comment">*</span><span class="comment"> triangular part of A is not referenced. 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"> LDA (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array A. LDA >= max(1,N).
</span><span class="comment">*</span><span class="comment">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?