zgbbrd.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 490 行 · 第 1/3 页
HTML
490 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>zgbbrd.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="ZGBBRD.1"></a><a href="zgbbrd.f.html#ZGBBRD.1">ZGBBRD</a>( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q,
$ LDQ, PT, LDPT, C, LDC, WORK, RWORK, 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> DOUBLE PRECISION D( * ), E( * ), RWORK( * )
COMPLEX*16 AB( LDAB, * ), C( LDC, * ), 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="ZGBBRD.21"></a><a href="zgbbrd.f.html#ZGBBRD.1">ZGBBRD</a> reduces a complex general m-by-n band matrix A to real upper
</span><span class="comment">*</span><span class="comment"> bidiagonal form B by a unitary 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) COMPLEX*16 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) DOUBLE PRECISION 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) DOUBLE PRECISION 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) COMPLEX*16 array, dimension (LDQ,M)
</span><span class="comment">*</span><span class="comment"> If VECT = 'Q' or 'B', the m-by-m unitary 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) COMPLEX*16 array, dimension (LDPT,N)
</span><span class="comment">*</span><span class="comment"> If VECT = 'P' or 'B', the n-by-n unitary 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) COMPLEX*16 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) COMPLEX*16 array, dimension (max(M,N))
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RWORK (workspace) DOUBLE PRECISION array, dimension (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> DOUBLE PRECISION ZERO
PARAMETER ( ZERO = 0.0D+0 )
COMPLEX*16 CZERO, CONE
PARAMETER ( CZERO = ( 0.0D+0, 0.0D+0 ),
$ CONE = ( 1.0D+0, 0.0D+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, MU, MU0, NR, NRT
DOUBLE PRECISION ABST, RC
COMPLEX*16 RA, RB, RS, T
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Subroutines ..
</span> EXTERNAL <a name="XERBLA.120"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>, <a name="ZLARGV.120"></a><a href="zlargv.f.html#ZLARGV.1">ZLARGV</a>, <a name="ZLARTG.120"></a><a href="zlartg.f.html#ZLARTG.1">ZLARTG</a>, <a name="ZLARTV.120"></a><a href="zlartv.f.html#ZLARTV.1">ZLARTV</a>, <a name="ZLASET.120"></a><a href="zlaset.f.html#ZLASET.1">ZLASET</a>, <a name="ZROT.120"></a><a href="zrot.f.html#ZROT.1">ZROT</a>,
$ ZSCAL
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Intrinsic Functions ..
</span> INTRINSIC ABS, DCONJG, MAX, MIN
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Functions ..
</span> LOGICAL <a name="LSAME.127"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
EXTERNAL <a name="LSAME.128"></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.134"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( VECT, <span class="string">'B'</span> )
WANTQ = <a name="LSAME.135"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( VECT, <span class="string">'Q'</span> ) .OR. WANTB
WANTPT = <a name="LSAME.136"></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.140"></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 + -
显示快捷键?