sgbbrd.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 468 行 · 第 1/3 页
HTML
468 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>sgbbrd.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="SGBBRD.1"></a><a href="sgbbrd.f.html#SGBBRD.1">SGBBRD</a>( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
$ LDQ, PT, LDPT, C, LDC, WORK, 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> CHARACTER VECT
INTEGER INFO, KL, KU, LDAB, LDC, LDPT, LDQ, M, N, NCC
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> REAL AB( LDAB, * ), C( LDC, * ), D( * ), E( * ),
$ PT( LDPT, * ), Q( LDQ, * ), WORK( * )
<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="SGBBRD.20"></a><a href="sgbbrd.f.html#SGBBRD.1">SGBBRD</a> reduces a real general m-by-n band matrix A to upper
</span><span class="comment">*</span><span class="comment"> bidiagonal form B by an orthogonal transformation: Q' * A * P = B.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The routine computes B, and optionally forms Q or P', or computes
</span><span class="comment">*</span><span class="comment"> Q'*C for a given matrix C.
</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"> VECT (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> Specifies whether or not the matrices Q and P' are to be
</span><span class="comment">*</span><span class="comment"> formed.
</span><span class="comment">*</span><span class="comment"> = 'N': do not form Q or P';
</span><span class="comment">*</span><span class="comment"> = 'Q': form Q only;
</span><span class="comment">*</span><span class="comment"> = 'P': form P' only;
</span><span class="comment">*</span><span class="comment"> = 'B': form both.
</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"> NCC (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of columns of the matrix C. NCC >= 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 of the matrix 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 of the matrix A. KU >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> AB (input/output) REAL array, dimension (LDAB,N)
</span><span class="comment">*</span><span class="comment"> On entry, the m-by-n band matrix A, stored in rows 1 to
</span><span class="comment">*</span><span class="comment"> KL+KU+1. The j-th column of A is stored in the j-th column of
</span><span class="comment">*</span><span class="comment"> the array AB as 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"> On exit, A is overwritten by values generated during the
</span><span class="comment">*</span><span class="comment"> reduction.
</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 A. LDAB >= KL+KU+1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> D (output) REAL array, dimension (min(M,N))
</span><span class="comment">*</span><span class="comment"> The diagonal elements of the bidiagonal matrix B.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> E (output) REAL array, dimension (min(M,N)-1)
</span><span class="comment">*</span><span class="comment"> The superdiagonal elements of the bidiagonal matrix B.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Q (output) REAL array, dimension (LDQ,M)
</span><span class="comment">*</span><span class="comment"> If VECT = 'Q' or 'B', the m-by-m orthogonal matrix Q.
</span><span class="comment">*</span><span class="comment"> If VECT = 'N' or 'P', the array Q is not referenced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDQ (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array Q.
</span><span class="comment">*</span><span class="comment"> LDQ >= max(1,M) if VECT = 'Q' or 'B'; LDQ >= 1 otherwise.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> PT (output) REAL array, dimension (LDPT,N)
</span><span class="comment">*</span><span class="comment"> If VECT = 'P' or 'B', the n-by-n orthogonal matrix P'.
</span><span class="comment">*</span><span class="comment"> If VECT = 'N' or 'Q', the array PT is not referenced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDPT (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array PT.
</span><span class="comment">*</span><span class="comment"> LDPT >= max(1,N) if VECT = 'P' or 'B'; LDPT >= 1 otherwise.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> C (input/output) REAL array, dimension (LDC,NCC)
</span><span class="comment">*</span><span class="comment"> On entry, an m-by-ncc matrix C.
</span><span class="comment">*</span><span class="comment"> On exit, C is overwritten by Q'*C.
</span><span class="comment">*</span><span class="comment"> C is not referenced if NCC = 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDC (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array C.
</span><span class="comment">*</span><span class="comment"> LDC >= max(1,M) if NCC > 0; LDC >= 1 if NCC = 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace) REAL array, dimension (2*max(M,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"> < 0: if INFO = -i, the i-th argument had an illegal value.
</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 WANTB, WANTC, WANTPT, WANTQ
INTEGER I, INCA, J, J1, J2, KB, KB1, KK, KLM, KLU1,
$ KUN, L, MINMN, ML, ML0, MN, MU, MU0, NR, NRT
REAL RA, RB, RC, RS
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Subroutines ..
</span> EXTERNAL <a name="SLARGV.113"></a><a href="slargv.f.html#SLARGV.1">SLARGV</a>, <a name="SLARTG.113"></a><a href="slartg.f.html#SLARTG.1">SLARTG</a>, <a name="SLARTV.113"></a><a href="slartv.f.html#SLARTV.1">SLARTV</a>, <a name="SLASET.113"></a><a href="slaset.f.html#SLASET.1">SLASET</a>, SROT, <a name="XERBLA.113"></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"> .. External Functions ..
</span> LOGICAL <a name="LSAME.119"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
EXTERNAL <a name="LSAME.120"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
<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> WANTB = <a name="LSAME.126"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( VECT, <span class="string">'B'</span> )
WANTQ = <a name="LSAME.127"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( VECT, <span class="string">'Q'</span> ) .OR. WANTB
WANTPT = <a name="LSAME.128"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( VECT, <span class="string">'P'</span> ) .OR. WANTB
WANTC = NCC.GT.0
KLU1 = KL + KU + 1
INFO = 0
IF( .NOT.WANTQ .AND. .NOT.WANTPT .AND. .NOT.<a name="LSAME.132"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( VECT, <span class="string">'N'</span> ) )
$ THEN
INFO = -1
ELSE IF( M.LT.0 ) THEN
INFO = -2
ELSE IF( N.LT.0 ) THEN
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?