cgbequ.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 272 行 · 第 1/2 页
HTML
272 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>cgbequ.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="CGBEQU.1"></a><a href="cgbequ.f.html#CGBEQU.1">CGBEQU</a>( M, N, KL, KU, AB, LDAB, R, C, ROWCND, COLCND,
$ AMAX, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK 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 INFO, KL, KU, LDAB, M, N
REAL AMAX, COLCND, ROWCND
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> REAL C( * ), R( * )
COMPLEX AB( LDAB, * )
<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="CGBEQU.20"></a><a href="cgbequ.f.html#CGBEQU.1">CGBEQU</a> computes row and column scalings intended to equilibrate an
</span><span class="comment">*</span><span class="comment"> M-by-N band matrix A and reduce its condition number. R returns the
</span><span class="comment">*</span><span class="comment"> row scale factors and C the column scale factors, chosen to try to
</span><span class="comment">*</span><span class="comment"> make the largest element in each row and column of the matrix B with
</span><span class="comment">*</span><span class="comment"> elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> R(i) and C(j) are restricted to be between SMLNUM = smallest safe
</span><span class="comment">*</span><span class="comment"> number and BIGNUM = largest safe number. Use of these scaling
</span><span class="comment">*</span><span class="comment"> factors is not guaranteed to reduce the condition number of A but
</span><span class="comment">*</span><span class="comment"> works well in practice.
</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"> M (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of rows of the matrix A. M >= 0.
</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 A. N >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> KL (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of subdiagonals within the band of A. KL >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> KU (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of superdiagonals within the band of A. KU >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> AB (input) COMPLEX array, dimension (LDAB,N)
</span><span class="comment">*</span><span class="comment"> The band matrix A, stored in rows 1 to KL+KU+1. The j-th
</span><span class="comment">*</span><span class="comment"> column of A is stored in the j-th column of the array AB as
</span><span class="comment">*</span><span class="comment"> follows:
</span><span class="comment">*</span><span class="comment"> AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDAB (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array AB. LDAB >= KL+KU+1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> R (output) REAL array, dimension (M)
</span><span class="comment">*</span><span class="comment"> If INFO = 0, or INFO > M, R contains the row scale factors
</span><span class="comment">*</span><span class="comment"> for A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> C (output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment"> If INFO = 0, C contains the column scale factors for A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ROWCND (output) REAL
</span><span class="comment">*</span><span class="comment"> If INFO = 0 or INFO > M, ROWCND contains the ratio of the
</span><span class="comment">*</span><span class="comment"> smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
</span><span class="comment">*</span><span class="comment"> AMAX is neither too large nor too small, it is not worth
</span><span class="comment">*</span><span class="comment"> scaling by R.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> COLCND (output) REAL
</span><span class="comment">*</span><span class="comment"> If INFO = 0, COLCND contains the ratio of the smallest
</span><span class="comment">*</span><span class="comment"> C(i) to the largest C(i). If COLCND >= 0.1, it is not
</span><span class="comment">*</span><span class="comment"> worth scaling by C.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> AMAX (output) REAL
</span><span class="comment">*</span><span class="comment"> Absolute value of largest matrix element. If AMAX is very
</span><span class="comment">*</span><span class="comment"> close to overflow or very close to underflow, the matrix
</span><span class="comment">*</span><span class="comment"> should be scaled.
</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"> < 0: if INFO = -i, the i-th argument had an illegal value
</span><span class="comment">*</span><span class="comment"> > 0: if INFO = i, and i is
</span><span class="comment">*</span><span class="comment"> <= M: the i-th row of A is exactly zero
</span><span class="comment">*</span><span class="comment"> > M: the (i-M)-th column of A is exactly zero
</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 ONE, ZERO
PARAMETER ( ONE = 1.0E+0, ZERO = 0.0E+0 )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Local Scalars ..
</span> INTEGER I, J, KD
REAL BIGNUM, RCMAX, RCMIN, SMLNUM
COMPLEX ZDUM
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Functions ..
</span> REAL <a name="SLAMCH.97"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>
EXTERNAL <a name="SLAMCH.98"></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 <a name="XERBLA.101"></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 ABS, AIMAG, MAX, MIN, REAL
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Statement Functions ..
</span> REAL CABS1
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Statement Function definitions ..
</span> CABS1( ZDUM ) = ABS( REAL( ZDUM ) ) + ABS( AIMAG( ZDUM ) )
<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><span class="comment">*</span><span class="comment"> Test the input parameters
</span><span class="comment">*</span><span class="comment">
</span> INFO = 0
IF( M.LT.0 ) THEN
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?