slatdf.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 262 行 · 第 1/2 页
HTML
262 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>slatdf.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="SLATDF.1"></a><a href="slatdf.f.html#SLATDF.1">SLATDF</a>( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
$ JPIV )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK auxiliary 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> INTEGER IJOB, LDZ, N
REAL RDSCAL, RDSUM
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> INTEGER IPIV( * ), JPIV( * )
REAL RHS( * ), Z( LDZ, * )
<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="SLATDF.20"></a><a href="slatdf.f.html#SLATDF.1">SLATDF</a> uses the LU factorization of the n-by-n matrix Z computed by
</span><span class="comment">*</span><span class="comment"> <a name="SGETC2.21"></a><a href="sgetc2.f.html#SGETC2.1">SGETC2</a> and computes a contribution to the reciprocal Dif-estimate
</span><span class="comment">*</span><span class="comment"> by solving Z * x = b for x, and choosing the r.h.s. b such that
</span><span class="comment">*</span><span class="comment"> the norm of x is as large as possible. On entry RHS = b holds the
</span><span class="comment">*</span><span class="comment"> contribution from earlier solved sub-systems, and on return RHS = x.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The factorization of Z returned by <a name="SGETC2.26"></a><a href="sgetc2.f.html#SGETC2.1">SGETC2</a> has the form Z = P*L*U*Q,
</span><span class="comment">*</span><span class="comment"> where P and Q are permutation matrices. L is lower triangular with
</span><span class="comment">*</span><span class="comment"> unit diagonal elements and U is upper triangular.
</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"> IJOB (input) INTEGER
</span><span class="comment">*</span><span class="comment"> IJOB = 2: First compute an approximative null-vector e
</span><span class="comment">*</span><span class="comment"> of Z using <a name="SGECON.35"></a><a href="sgecon.f.html#SGECON.1">SGECON</a>, e is normalized and solve for
</span><span class="comment">*</span><span class="comment"> Zx = +-e - f with the sign giving the greater value
</span><span class="comment">*</span><span class="comment"> of 2-norm(x). About 5 times as expensive as Default.
</span><span class="comment">*</span><span class="comment"> IJOB .ne. 2: Local look ahead strategy where all entries of
</span><span class="comment">*</span><span class="comment"> the r.h.s. b is choosen as either +1 or -1 (Default).
</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 columns of the matrix Z.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z (input) REAL array, dimension (LDZ, N)
</span><span class="comment">*</span><span class="comment"> On entry, the LU part of the factorization of the n-by-n
</span><span class="comment">*</span><span class="comment"> matrix Z computed by <a name="SGETC2.46"></a><a href="sgetc2.f.html#SGETC2.1">SGETC2</a>: Z = P * L * U * Q
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDZ (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array Z. LDA >= max(1, N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RHS (input/output) REAL array, dimension N.
</span><span class="comment">*</span><span class="comment"> On entry, RHS contains contributions from other subsystems.
</span><span class="comment">*</span><span class="comment"> On exit, RHS contains the solution of the subsystem with
</span><span class="comment">*</span><span class="comment"> entries acoording to the value of IJOB (see above).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RDSUM (input/output) REAL
</span><span class="comment">*</span><span class="comment"> On entry, the sum of squares of computed contributions to
</span><span class="comment">*</span><span class="comment"> the Dif-estimate under computation by <a name="STGSYL.58"></a><a href="stgsyl.f.html#STGSYL.1">STGSYL</a>, where the
</span><span class="comment">*</span><span class="comment"> scaling factor RDSCAL (see below) has been factored out.
</span><span class="comment">*</span><span class="comment"> On exit, the corresponding sum of squares updated with the
</span><span class="comment">*</span><span class="comment"> contributions from the current sub-system.
</span><span class="comment">*</span><span class="comment"> If TRANS = 'T' RDSUM is not touched.
</span><span class="comment">*</span><span class="comment"> NOTE: RDSUM only makes sense when <a name="STGSY2.63"></a><a href="stgsy2.f.html#STGSY2.1">STGSY2</a> is called by <a name="STGSYL.63"></a><a href="stgsyl.f.html#STGSYL.1">STGSYL</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RDSCAL (input/output) REAL
</span><span class="comment">*</span><span class="comment"> On entry, scaling factor used to prevent overflow in RDSUM.
</span><span class="comment">*</span><span class="comment"> On exit, RDSCAL is updated w.r.t. the current contributions
</span><span class="comment">*</span><span class="comment"> in RDSUM.
</span><span class="comment">*</span><span class="comment"> If TRANS = 'T', RDSCAL is not touched.
</span><span class="comment">*</span><span class="comment"> NOTE: RDSCAL only makes sense when <a name="STGSY2.70"></a><a href="stgsy2.f.html#STGSY2.1">STGSY2</a> is called by
</span><span class="comment">*</span><span class="comment"> <a name="STGSYL.71"></a><a href="stgsyl.f.html#STGSYL.1">STGSYL</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IPIV (input) INTEGER array, dimension (N).
</span><span class="comment">*</span><span class="comment"> The pivot indices; for 1 <= i <= N, row i of the
</span><span class="comment">*</span><span class="comment"> matrix has been interchanged with row IPIV(i).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> JPIV (input) INTEGER array, dimension (N).
</span><span class="comment">*</span><span class="comment"> The pivot indices; for 1 <= j <= N, column j of the
</span><span class="comment">*</span><span class="comment"> matrix has been interchanged with column JPIV(j).
</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"> Based on contributions by
</span><span class="comment">*</span><span class="comment"> Bo Kagstrom and Peter Poromaa, Department of Computing Science,
</span><span class="comment">*</span><span class="comment"> Umea University, S-901 87 Umea, Sweden.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> This routine is a further developed implementation of algorithm
</span><span class="comment">*</span><span class="comment"> BSOLVE in [1] using complete pivoting in the LU factorization.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> [1] Bo Kagstrom and Lars Westin,
</span><span class="comment">*</span><span class="comment"> Generalized Schur Methods with Condition Estimators for
</span><span class="comment">*</span><span class="comment"> Solving the Generalized Sylvester Equation, IEEE Transactions
</span><span class="comment">*</span><span class="comment"> on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> [2] Peter Poromaa,
</span><span class="comment">*</span><span class="comment"> On Efficient and Robust Estimators for the Separation
</span><span class="comment">*</span><span class="comment"> between two Regular Matrix Pairs with Applications in
</span><span class="comment">*</span><span class="comment"> Condition Estimation. Report IMINF-95.05, Departement of
</span><span class="comment">*</span><span class="comment"> Computing Science, Umea University, S-901 87 Umea, Sweden, 1995.
</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> INTEGER MAXDIM
PARAMETER ( MAXDIM = 8 )
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> INTEGER I, INFO, J, K
REAL BM, BP, PMONE, SMINU, SPLUS, TEMP
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?