zlaein.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 288 行 · 第 1/2 页
HTML
288 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>zlaein.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="ZLAEIN.1"></a><a href="zlaein.f.html#ZLAEIN.1">ZLAEIN</a>( RIGHTV, NOINIT, N, H, LDH, W, V, B, LDB, RWORK,
$ EPS3, SMLNUM, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK auxiliary 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> LOGICAL NOINIT, RIGHTV
INTEGER INFO, LDB, LDH, N
DOUBLE PRECISION EPS3, SMLNUM
COMPLEX*16 W
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> DOUBLE PRECISION RWORK( * )
COMPLEX*16 B( LDB, * ), H( LDH, * ), V( * )
<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="ZLAEIN.22"></a><a href="zlaein.f.html#ZLAEIN.1">ZLAEIN</a> uses inverse iteration to find a right or left eigenvector
</span><span class="comment">*</span><span class="comment"> corresponding to the eigenvalue W of a complex upper Hessenberg
</span><span class="comment">*</span><span class="comment"> matrix H.
</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"> RIGHTV (input) LOGICAL
</span><span class="comment">*</span><span class="comment"> = .TRUE. : compute right eigenvector;
</span><span class="comment">*</span><span class="comment"> = .FALSE.: compute left eigenvector.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> NOINIT (input) LOGICAL
</span><span class="comment">*</span><span class="comment"> = .TRUE. : no initial vector supplied in V
</span><span class="comment">*</span><span class="comment"> = .FALSE.: initial vector supplied in V.
</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 >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> H (input) COMPLEX*16 array, dimension (LDH,N)
</span><span class="comment">*</span><span class="comment"> The upper Hessenberg matrix H.
</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 >= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> W (input) COMPLEX*16
</span><span class="comment">*</span><span class="comment"> The eigenvalue of H whose corresponding right or left
</span><span class="comment">*</span><span class="comment"> eigenvector is to be computed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> V (input/output) COMPLEX*16 array, dimension (N)
</span><span class="comment">*</span><span class="comment"> On entry, if NOINIT = .FALSE., V must contain a starting
</span><span class="comment">*</span><span class="comment"> vector for inverse iteration; otherwise V need not be set.
</span><span class="comment">*</span><span class="comment"> On exit, V contains the computed eigenvector, normalized so
</span><span class="comment">*</span><span class="comment"> that the component of largest magnitude has magnitude 1; here
</span><span class="comment">*</span><span class="comment"> the magnitude of a complex number (x,y) is taken to be
</span><span class="comment">*</span><span class="comment"> |x| + |y|.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> B (workspace) COMPLEX*16 array, dimension (LDB,N)
</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"> RWORK (workspace) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> EPS3 (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> A small machine-dependent value which is used to perturb
</span><span class="comment">*</span><span class="comment"> close eigenvalues, and to replace zero pivots.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SMLNUM (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> A machine-dependent value close to the underflow threshold.
</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"> = 1: inverse iteration did not converge; V is set to the
</span><span class="comment">*</span><span class="comment"> last iterate.
</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 ONE, TENTH
PARAMETER ( ONE = 1.0D+0, TENTH = 1.0D-1 )
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> CHARACTER NORMIN, TRANS
INTEGER I, IERR, ITS, J
DOUBLE PRECISION GROWTO, NRMSML, ROOTN, RTEMP, SCALE, VNORM
COMPLEX*16 CDUM, EI, EJ, TEMP, X
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Functions ..
</span> INTEGER IZAMAX
DOUBLE PRECISION DZASUM, DZNRM2
COMPLEX*16 <a name="ZLADIV.94"></a><a href="zladiv.f.html#ZLADIV.1">ZLADIV</a>
EXTERNAL IZAMAX, DZASUM, DZNRM2, <a name="ZLADIV.95"></a><a href="zladiv.f.html#ZLADIV.1">ZLADIV</a>
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Subroutines ..
</span> EXTERNAL ZDSCAL, <a name="ZLATRS.98"></a><a href="zlatrs.f.html#ZLATRS.1">ZLATRS</a>
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Intrinsic Functions ..
</span> INTRINSIC ABS, DBLE, DIMAG, MAX, SQRT
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Statement Functions ..
</span> DOUBLE PRECISION CABS1
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Statement Function definitions ..
</span> CABS1( CDUM ) = ABS( DBLE( CDUM ) ) + ABS( DIMAG( CDUM ) )
<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> INFO = 0
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> GROWTO is the threshold used in the acceptance test for an
</span><span class="comment">*</span><span class="comment"> eigenvector.
</span><span class="comment">*</span><span class="comment">
</span> ROOTN = SQRT( DBLE( N ) )
GROWTO = TENTH / ROOTN
NRMSML = MAX( ONE, EPS3*ROOTN )*SMLNUM
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Form B = H - W*I (except that the subdiagonal elements are not
</span><span class="comment">*</span><span class="comment"> stored).
</span><span class="comment">*</span><span class="comment">
</span> DO 20 J = 1, N
DO 10 I = 1, J - 1
B( I, J ) = H( I, J )
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?