ztzrzf.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 269 行 · 第 1/2 页
HTML
269 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ztzrzf.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="ZTZRZF.1"></a><a href="ztzrzf.f.html#ZTZRZF.1">ZTZRZF</a>( M, N, A, LDA, TAU, WORK, LWORK, 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, LDA, LWORK, M, N
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> COMPLEX*16 A( LDA, * ), TAU( * ), 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="ZTZRZF.17"></a><a href="ztzrzf.f.html#ZTZRZF.1">ZTZRZF</a> reduces the M-by-N ( M<=N ) complex upper trapezoidal matrix A
</span><span class="comment">*</span><span class="comment"> to upper triangular form by means of unitary transformations.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The upper trapezoidal matrix A is factored as
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A = ( R 0 ) * Z,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> where Z is an N-by-N unitary matrix and R is an M-by-M upper
</span><span class="comment">*</span><span class="comment"> triangular matrix.
</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 >= M.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A (input/output) COMPLEX*16 array, dimension (LDA,N)
</span><span class="comment">*</span><span class="comment"> On entry, the leading M-by-N upper trapezoidal part of the
</span><span class="comment">*</span><span class="comment"> array A must contain the matrix to be factorized.
</span><span class="comment">*</span><span class="comment"> On exit, the leading M-by-M upper triangular part of A
</span><span class="comment">*</span><span class="comment"> contains the upper triangular matrix R, and elements M+1 to
</span><span class="comment">*</span><span class="comment"> N of the first M rows of A, with the array TAU, represent the
</span><span class="comment">*</span><span class="comment"> unitary matrix Z as a product of M elementary reflectors.
</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,M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> TAU (output) COMPLEX*16 array, dimension (M)
</span><span class="comment">*</span><span class="comment"> The scalar factors of the elementary reflectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
</span><span class="comment">*</span><span class="comment"> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LWORK (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The dimension of the array WORK. LWORK >= max(1,M).
</span><span class="comment">*</span><span class="comment"> For optimum performance LWORK >= M*NB, where NB is
</span><span class="comment">*</span><span class="comment"> the optimal blocksize.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If LWORK = -1, then a workspace query is assumed; the routine
</span><span class="comment">*</span><span class="comment"> only calculates the optimal size of the WORK array, returns
</span><span class="comment">*</span><span class="comment"> this value as the first entry of the WORK array, and no error
</span><span class="comment">*</span><span class="comment"> message related to LWORK is issued by <a name="XERBLA.61"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>.
</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"> 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"> A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The factorization is obtained by Householder's method. The kth
</span><span class="comment">*</span><span class="comment"> transformation matrix, Z( k ), which is used to introduce zeros into
</span><span class="comment">*</span><span class="comment"> the ( m - k + 1 )th row of A, is given in the form
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z( k ) = ( I 0 ),
</span><span class="comment">*</span><span class="comment"> ( 0 T( k ) )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> where
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> T( k ) = I - tau*u( k )*u( k )', u( k ) = ( 1 ),
</span><span class="comment">*</span><span class="comment"> ( 0 )
</span><span class="comment">*</span><span class="comment"> ( z( k ) )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> tau is a scalar and z( k ) is an ( n - m ) element vector.
</span><span class="comment">*</span><span class="comment"> tau and z( k ) are chosen to annihilate the elements of the kth row
</span><span class="comment">*</span><span class="comment"> of X.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The scalar tau is returned in the kth element of TAU and the vector
</span><span class="comment">*</span><span class="comment"> u( k ) in the kth row of A, such that the elements of z( k ) are
</span><span class="comment">*</span><span class="comment"> in a( k, m + 1 ), ..., a( k, n ). The elements of R are returned in
</span><span class="comment">*</span><span class="comment"> the upper triangular part of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z is given by
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z = Z( 1 ) * Z( 2 ) * ... * Z( m ).
</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> COMPLEX*16 ZERO
PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ) )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Local Scalars ..
</span> LOGICAL LQUERY
INTEGER I, IB, IWS, KI, KK, LDWORK, LWKOPT, M1, MU, NB,
$ NBMIN, NX
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Subroutines ..
</span> EXTERNAL <a name="XERBLA.111"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>, <a name="ZLARZB.111"></a><a href="zlarzb.f.html#ZLARZB.1">ZLARZB</a>, <a name="ZLARZT.111"></a><a href="zlarzt.f.html#ZLARZT.1">ZLARZT</a>, <a name="ZLATRZ.111"></a><a href="zlatrz.f.html#ZLATRZ.1">ZLATRZ</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 ..
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?