sgeev.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 448 行 · 第 1/3 页
HTML
448 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>sgeev.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="SGEEV.1"></a><a href="sgeev.f.html#SGEEV.1">SGEEV</a>( JOBVL, JOBVR, N, A, LDA, WR, WI, VL, LDVL, VR,
$ LDVR, 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> CHARACTER JOBVL, JOBVR
INTEGER INFO, LDA, LDVL, LDVR, LWORK, N
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> REAL A( LDA, * ), VL( LDVL, * ), VR( LDVR, * ),
$ WI( * ), WORK( * ), WR( * )
<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="SGEEV.20"></a><a href="sgeev.f.html#SGEEV.1">SGEEV</a> computes for an N-by-N real nonsymmetric matrix A, the
</span><span class="comment">*</span><span class="comment"> eigenvalues and, optionally, the left and/or right eigenvectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The right eigenvector v(j) of A satisfies
</span><span class="comment">*</span><span class="comment"> A * v(j) = lambda(j) * v(j)
</span><span class="comment">*</span><span class="comment"> where lambda(j) is its eigenvalue.
</span><span class="comment">*</span><span class="comment"> The left eigenvector u(j) of A satisfies
</span><span class="comment">*</span><span class="comment"> u(j)**H * A = lambda(j) * u(j)**H
</span><span class="comment">*</span><span class="comment"> where u(j)**H denotes the conjugate transpose of u(j).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The computed eigenvectors are normalized to have Euclidean norm
</span><span class="comment">*</span><span class="comment"> equal to 1 and largest component real.
</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"> JOBVL (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': left eigenvectors of A are not computed;
</span><span class="comment">*</span><span class="comment"> = 'V': left eigenvectors of A are computed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> JOBVR (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': right eigenvectors of A are not computed;
</span><span class="comment">*</span><span class="comment"> = 'V': right eigenvectors of A are computed.
</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 A. N >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A (input/output) REAL array, dimension (LDA,N)
</span><span class="comment">*</span><span class="comment"> On entry, the N-by-N matrix A.
</span><span class="comment">*</span><span class="comment"> On exit, A has been overwritten.
</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"> WR (output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment"> WI (output) REAL array, dimension (N)
</span><span class="comment">*</span><span class="comment"> WR and WI contain the real and imaginary parts,
</span><span class="comment">*</span><span class="comment"> respectively, of the computed eigenvalues. Complex
</span><span class="comment">*</span><span class="comment"> conjugate pairs of eigenvalues appear consecutively
</span><span class="comment">*</span><span class="comment"> with the eigenvalue having the positive imaginary part
</span><span class="comment">*</span><span class="comment"> first.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VL (output) REAL array, dimension (LDVL,N)
</span><span class="comment">*</span><span class="comment"> If JOBVL = 'V', the left eigenvectors u(j) are stored one
</span><span class="comment">*</span><span class="comment"> after another in the columns of VL, in the same order
</span><span class="comment">*</span><span class="comment"> as their eigenvalues.
</span><span class="comment">*</span><span class="comment"> If JOBVL = 'N', VL is not referenced.
</span><span class="comment">*</span><span class="comment"> If the j-th eigenvalue is real, then u(j) = VL(:,j),
</span><span class="comment">*</span><span class="comment"> the j-th column of VL.
</span><span class="comment">*</span><span class="comment"> If the j-th and (j+1)-st eigenvalues form a complex
</span><span class="comment">*</span><span class="comment"> conjugate pair, then u(j) = VL(:,j) + i*VL(:,j+1) and
</span><span class="comment">*</span><span class="comment"> u(j+1) = VL(:,j) - i*VL(:,j+1).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDVL (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array VL. LDVL >= 1; if
</span><span class="comment">*</span><span class="comment"> JOBVL = 'V', LDVL >= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VR (output) REAL array, dimension (LDVR,N)
</span><span class="comment">*</span><span class="comment"> If JOBVR = 'V', the right eigenvectors v(j) are stored one
</span><span class="comment">*</span><span class="comment"> after another in the columns of VR, in the same order
</span><span class="comment">*</span><span class="comment"> as their eigenvalues.
</span><span class="comment">*</span><span class="comment"> If JOBVR = 'N', VR is not referenced.
</span><span class="comment">*</span><span class="comment"> If the j-th eigenvalue is real, then v(j) = VR(:,j),
</span><span class="comment">*</span><span class="comment"> the j-th column of VR.
</span><span class="comment">*</span><span class="comment"> If the j-th and (j+1)-st eigenvalues form a complex
</span><span class="comment">*</span><span class="comment"> conjugate pair, then v(j) = VR(:,j) + i*VR(:,j+1) and
</span><span class="comment">*</span><span class="comment"> v(j+1) = VR(:,j) - i*VR(:,j+1).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDVR (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array VR. LDVR >= 1; if
</span><span class="comment">*</span><span class="comment"> JOBVR = 'V', LDVR >= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace/output) REAL 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,3*N), and
</span><span class="comment">*</span><span class="comment"> if JOBVL = 'V' or JOBVR = 'V', LWORK >= 4*N. For good
</span><span class="comment">*</span><span class="comment"> performance, LWORK must generally be larger.
</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.103"></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"> > 0: if INFO = i, the QR algorithm failed to compute all the
</span><span class="comment">*</span><span class="comment"> eigenvalues, and no eigenvectors have been computed;
</span><span class="comment">*</span><span class="comment"> elements i+1:N of WR and WI contain eigenvalues which
</span><span class="comment">*</span><span class="comment"> have converged.
</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> REAL ZERO, ONE
PARAMETER ( ZERO = 0.0E0, ONE = 1.0E0 )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Local Scalars ..
</span> LOGICAL LQUERY, SCALEA, WANTVL, WANTVR
CHARACTER SIDE
INTEGER HSWORK, I, IBAL, IERR, IHI, ILO, ITAU, IWRK, K,
$ MAXWRK, MINWRK, NOUT
REAL ANRM, BIGNUM, CS, CSCALE, EPS, R, SCL, SMLNUM,
$ SN
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Local Arrays ..
</span> LOGICAL SELECT( 1 )
REAL DUM( 1 )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Subroutines ..
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?