dhseqr.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 432 行 · 第 1/3 页
HTML
432 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dhseqr.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="DHSEQR.1"></a><a href="dhseqr.f.html#DHSEQR.1">DHSEQR</a>( JOB, COMPZ, N, ILO, IHI, H, LDH, WR, WI, Z,
$ LDZ, WORK, LWORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK driver 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 IHI, ILO, INFO, LDH, LDZ, LWORK, N
CHARACTER COMPZ, JOB
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ),
$ Z( LDZ, * )
<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="DHSEQR.19"></a><a href="dhseqr.f.html#DHSEQR.1">DHSEQR</a> computes the eigenvalues of a Hessenberg matrix H
</span><span class="comment">*</span><span class="comment"> and, optionally, the matrices T and Z from the Schur decomposition
</span><span class="comment">*</span><span class="comment"> H = Z T Z**T, where T is an upper quasi-triangular matrix (the
</span><span class="comment">*</span><span class="comment"> Schur form), and Z is the orthogonal matrix of Schur vectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Optionally Z may be postmultiplied into an input orthogonal
</span><span class="comment">*</span><span class="comment"> matrix Q so that this routine can give the Schur factorization
</span><span class="comment">*</span><span class="comment"> of a matrix A which has been reduced to the Hessenberg form H
</span><span class="comment">*</span><span class="comment"> by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
</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"> JOB (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'E': compute eigenvalues only;
</span><span class="comment">*</span><span class="comment"> = 'S': compute eigenvalues and the Schur form T.
</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': no Schur vectors are computed;
</span><span class="comment">*</span><span class="comment"> = 'I': Z is initialized to the unit matrix and the matrix Z
</span><span class="comment">*</span><span class="comment"> of Schur vectors of H is returned;
</span><span class="comment">*</span><span class="comment"> = 'V': Z must contain an orthogonal matrix Q on entry, and
</span><span class="comment">*</span><span class="comment"> the product Q*Z 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 matrix H. N .GE. 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"> It is assumed that H is already upper triangular in rows
</span><span class="comment">*</span><span class="comment"> and columns 1:ILO-1 and IHI+1:N. ILO and IHI are normally
</span><span class="comment">*</span><span class="comment"> set by a previous call to <a name="DGEBAL.50"></a><a href="dgebal.f.html#DGEBAL.1">DGEBAL</a>, and then passed to <a name="DGEHRD.50"></a><a href="dgehrd.f.html#DGEHRD.1">DGEHRD</a>
</span><span class="comment">*</span><span class="comment"> when the matrix output by <a name="DGEBAL.51"></a><a href="dgebal.f.html#DGEBAL.1">DGEBAL</a> is reduced to Hessenberg
</span><span class="comment">*</span><span class="comment"> form. Otherwise ILO and IHI should be set to 1 and N
</span><span class="comment">*</span><span class="comment"> respectively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N.
</span><span class="comment">*</span><span class="comment"> If N = 0, then ILO = 1 and IHI = 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> H (input/output) DOUBLE PRECISION array, dimension (LDH,N)
</span><span class="comment">*</span><span class="comment"> On entry, the upper Hessenberg matrix H.
</span><span class="comment">*</span><span class="comment"> On exit, if INFO = 0 and JOB = 'S', then H contains the
</span><span class="comment">*</span><span class="comment"> upper quasi-triangular matrix T from the Schur decomposition
</span><span class="comment">*</span><span class="comment"> (the Schur form); 2-by-2 diagonal blocks (corresponding to
</span><span class="comment">*</span><span class="comment"> complex conjugate pairs of eigenvalues) are returned in
</span><span class="comment">*</span><span class="comment"> standard form, with H(i,i) = H(i+1,i+1) and
</span><span class="comment">*</span><span class="comment"> H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and JOB = 'E', the
</span><span class="comment">*</span><span class="comment"> contents of H are unspecified on exit. (The output value of
</span><span class="comment">*</span><span class="comment"> H when INFO.GT.0 is given under the description of INFO
</span><span class="comment">*</span><span class="comment"> below.)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Unlike earlier versions of <a name="DHSEQR.68"></a><a href="dhseqr.f.html#DHSEQR.1">DHSEQR</a>, this subroutine may
</span><span class="comment">*</span><span class="comment"> explicitly H(i,j) = 0 for i.GT.j and j = 1, 2, ... ILO-1
</span><span class="comment">*</span><span class="comment"> or j = IHI+1, IHI+2, ... N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDH (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array H. LDH .GE. max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WR (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> WI (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The real and imaginary parts, respectively, of the computed
</span><span class="comment">*</span><span class="comment"> eigenvalues. If two eigenvalues are computed as a complex
</span><span class="comment">*</span><span class="comment"> conjugate pair, they are stored in consecutive elements of
</span><span class="comment">*</span><span class="comment"> WR and WI, say the i-th and (i+1)th, with WI(i) .GT. 0 and
</span><span class="comment">*</span><span class="comment"> WI(i+1) .LT. 0. If JOB = 'S', the eigenvalues are stored in
</span><span class="comment">*</span><span class="comment"> the same order as on the diagonal of the Schur form returned
</span><span class="comment">*</span><span class="comment"> in H, with WR(i) = H(i,i) and, if H(i:i+1,i:i+1) is a 2-by-2
</span><span class="comment">*</span><span class="comment"> diagonal block, WI(i) = sqrt(-H(i+1,i)*H(i,i+1)) and
</span><span class="comment">*</span><span class="comment"> WI(i+1) = -WI(i).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
</span><span class="comment">*</span><span class="comment"> If COMPZ = 'N', Z is not referenced.
</span><span class="comment">*</span><span class="comment"> If COMPZ = 'I', on entry Z need not be set and on exit,
</span><span class="comment">*</span><span class="comment"> if INFO = 0, Z contains the orthogonal matrix Z of the Schur
</span><span class="comment">*</span><span class="comment"> vectors of H. If COMPZ = 'V', on entry Z must contain an
</span><span class="comment">*</span><span class="comment"> N-by-N matrix Q, which is assumed to be equal to the unit
</span><span class="comment">*</span><span class="comment"> matrix except for the submatrix Z(ILO:IHI,ILO:IHI). On exit,
</span><span class="comment">*</span><span class="comment"> if INFO = 0, Z contains Q*Z.
</span><span class="comment">*</span><span class="comment"> Normally Q is the orthogonal matrix generated by <a name="DORGHR.95"></a><a href="dorghr.f.html#DORGHR.1">DORGHR</a>
</span><span class="comment">*</span><span class="comment"> after the call to <a name="DGEHRD.96"></a><a href="dgehrd.f.html#DGEHRD.1">DGEHRD</a> which formed the Hessenberg matrix
</span><span class="comment">*</span><span class="comment"> H. (The output value of Z when INFO.GT.0 is given under
</span><span class="comment">*</span><span class="comment"> the description of INFO below.)
</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. if COMPZ = 'I' or
</span><span class="comment">*</span><span class="comment"> COMPZ = 'V', then LDZ.GE.MAX(1,N). Otherwize, LDZ.GE.1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
</span><span class="comment">*</span><span class="comment"> On exit, if INFO = 0, WORK(1) returns an estimate of
</span><span class="comment">*</span><span class="comment"> the optimal value for 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 .GE. max(1,N)
</span><span class="comment">*</span><span class="comment"> is sufficient, but LWORK typically as large as 6*N may
</span><span class="comment">*</span><span class="comment"> be required for optimal performance. A workspace query
</span><span class="comment">*</span><span class="comment"> to determine the optimal workspace size is recommended.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If LWORK = -1, then <a name="DHSEQR.114"></a><a href="dhseqr.f.html#DHSEQR.1">DHSEQR</a> does a workspace query.
</span><span class="comment">*</span><span class="comment"> In this case, <a name="DHSEQR.115"></a><a href="dhseqr.f.html#DHSEQR.1">DHSEQR</a> checks the input parameters and
</span><span class="comment">*</span><span class="comment"> estimates the optimal workspace size for the given
</span><span class="comment">*</span><span class="comment"> values of N, ILO and IHI. The estimate is returned
</span><span class="comment">*</span><span class="comment"> in WORK(1). No error message related to LWORK is
</span><span class="comment">*</span><span class="comment"> issued by <a name="XERBLA.119"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>. Neither H nor Z are accessed.
</span><span class="comment">*</span><span class="comment">
</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"> .LT. 0: if INFO = -i, the i-th argument had an illegal
</span><span class="comment">*</span><span class="comment"> value
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?