zgghrd.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 289 行 · 第 1/2 页
HTML
289 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>zgghrd.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="ZGGHRD.1"></a><a href="zgghrd.f.html#ZGGHRD.1">ZGGHRD</a>( COMPQ, COMPZ, N, ILO, IHI, A, LDA, B, LDB, Q,
$ LDQ, Z, LDZ, 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 COMPQ, COMPZ
INTEGER IHI, ILO, INFO, LDA, LDB, LDQ, LDZ, N
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> COMPLEX*16 A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
$ 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="ZGGHRD.20"></a><a href="zgghrd.f.html#ZGGHRD.1">ZGGHRD</a> reduces a pair of complex matrices (A,B) to generalized upper
</span><span class="comment">*</span><span class="comment"> Hessenberg form using unitary transformations, where A is a
</span><span class="comment">*</span><span class="comment"> general matrix and B is upper triangular. The form of the
</span><span class="comment">*</span><span class="comment"> generalized eigenvalue problem is
</span><span class="comment">*</span><span class="comment"> A*x = lambda*B*x,
</span><span class="comment">*</span><span class="comment"> and B is typically made upper triangular by computing its QR
</span><span class="comment">*</span><span class="comment"> factorization and moving the unitary matrix Q to the left side
</span><span class="comment">*</span><span class="comment"> of the equation.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> This subroutine simultaneously reduces A to a Hessenberg matrix H:
</span><span class="comment">*</span><span class="comment"> Q**H*A*Z = H
</span><span class="comment">*</span><span class="comment"> and transforms B to another upper triangular matrix T:
</span><span class="comment">*</span><span class="comment"> Q**H*B*Z = T
</span><span class="comment">*</span><span class="comment"> in order to reduce the problem to its standard form
</span><span class="comment">*</span><span class="comment"> H*y = lambda*T*y
</span><span class="comment">*</span><span class="comment"> where y = Z**H*x.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The unitary matrices Q and Z are determined as products of Givens
</span><span class="comment">*</span><span class="comment"> rotations. They may either be formed explicitly, or they may be
</span><span class="comment">*</span><span class="comment"> postmultiplied into input matrices Q1 and Z1, so that
</span><span class="comment">*</span><span class="comment"> Q1 * A * Z1**H = (Q1*Q) * H * (Z1*Z)**H
</span><span class="comment">*</span><span class="comment"> Q1 * B * Z1**H = (Q1*Q) * T * (Z1*Z)**H
</span><span class="comment">*</span><span class="comment"> If Q1 is the unitary matrix from the QR factorization of B in the
</span><span class="comment">*</span><span class="comment"> original equation A*x = lambda*B*x, then <a name="ZGGHRD.43"></a><a href="zgghrd.f.html#ZGGHRD.1">ZGGHRD</a> reduces the original
</span><span class="comment">*</span><span class="comment"> problem to generalized Hessenberg form.
</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"> COMPQ (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': do not compute Q;
</span><span class="comment">*</span><span class="comment"> = 'I': Q is initialized to the unit matrix, and the
</span><span class="comment">*</span><span class="comment"> unitary matrix Q is returned;
</span><span class="comment">*</span><span class="comment"> = 'V': Q must contain a unitary matrix Q1 on entry,
</span><span class="comment">*</span><span class="comment"> and the product Q1*Q is returned.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> COMPZ (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': do not compute Q;
</span><span class="comment">*</span><span class="comment"> = 'I': Q is initialized to the unit matrix, and the
</span><span class="comment">*</span><span class="comment"> unitary matrix Q is returned;
</span><span class="comment">*</span><span class="comment"> = 'V': Q must contain a unitary matrix Q1 on entry,
</span><span class="comment">*</span><span class="comment"> and the product Q1*Q is returned.
</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 order of the matrices A and B. N >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ILO (input) INTEGER
</span><span class="comment">*</span><span class="comment"> IHI (input) INTEGER
</span><span class="comment">*</span><span class="comment"> ILO and IHI mark the rows and columns of A which are to be
</span><span class="comment">*</span><span class="comment"> reduced. It is assumed that A is already upper triangular
</span><span class="comment">*</span><span class="comment"> in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are
</span><span class="comment">*</span><span class="comment"> normally set by a previous call to <a name="ZGGBAL.71"></a><a href="zggbal.f.html#ZGGBAL.1">ZGGBAL</a>; otherwise they
</span><span class="comment">*</span><span class="comment"> should be set to 1 and N respectively.
</span><span class="comment">*</span><span class="comment"> 1 <= ILO <= IHI <= N, if N > 0; ILO=1 and IHI=0, if N=0.
</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 N-by-N general matrix to be reduced.
</span><span class="comment">*</span><span class="comment"> On exit, the upper triangle and the first subdiagonal of A
</span><span class="comment">*</span><span class="comment"> are overwritten with the upper Hessenberg matrix H, and the
</span><span class="comment">*</span><span class="comment"> rest is set to zero.
</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,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> B (input/output) COMPLEX*16 array, dimension (LDB, N)
</span><span class="comment">*</span><span class="comment"> On entry, the N-by-N upper triangular matrix B.
</span><span class="comment">*</span><span class="comment"> On exit, the upper triangular matrix T = Q**H B Z. The
</span><span class="comment">*</span><span class="comment"> elements below the diagonal are set to zero.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDB (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array B. LDB >= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Q (input/output) COMPLEX*16 array, dimension (LDQ, N)
</span><span class="comment">*</span><span class="comment"> On entry, if COMPQ = 'V', the unitary matrix Q1, typically
</span><span class="comment">*</span><span class="comment"> from the QR factorization of B.
</span><span class="comment">*</span><span class="comment"> On exit, if COMPQ='I', the unitary matrix Q, and if
</span><span class="comment">*</span><span class="comment"> COMPQ = 'V', the product Q1*Q.
</span><span class="comment">*</span><span class="comment"> Not referenced if COMPQ='N'.
</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 >= N if COMPQ='V' or 'I'; LDQ >= 1 otherwise.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z (input/output) COMPLEX*16 array, dimension (LDZ, N)
</span><span class="comment">*</span><span class="comment"> On entry, if COMPZ = 'V', the unitary matrix Z1.
</span><span class="comment">*</span><span class="comment"> On exit, if COMPZ='I', the unitary matrix Z, and if
</span><span class="comment">*</span><span class="comment"> COMPZ = 'V', the product Z1*Z.
</span><span class="comment">*</span><span class="comment"> Not referenced if COMPZ='N'.
</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.
</span><span class="comment">*</span><span class="comment"> LDZ >= N if COMPZ='V' or 'I'; LDZ >= 1 otherwise.
</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"> This routine reduces A to Hessenberg and B to triangular form by
</span><span class="comment">*</span><span class="comment"> an unblocked reduction, as described in _Matrix_Computations_,
</span><span class="comment">*</span><span class="comment"> by Golub and van Loan (Johns Hopkins Press).
</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 ..
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?