zstemr.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 689 行 · 第 1/4 页
HTML
689 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>zstemr.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="ZSTEMR.1"></a><a href="zstemr.f.html#ZSTEMR.1">ZSTEMR</a>( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
$ M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
$ IWORK, LIWORK, INFO )
IMPLICIT NONE
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK computational 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 JOBZ, RANGE
LOGICAL TRYRAC
INTEGER IL, INFO, IU, LDZ, NZC, LIWORK, LWORK, M, N
DOUBLE PRECISION VL, VU
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> INTEGER ISUPPZ( * ), IWORK( * )
DOUBLE PRECISION D( * ), E( * ), W( * ), WORK( * )
COMPLEX*16 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="ZSTEMR.25"></a><a href="zstemr.f.html#ZSTEMR.1">ZSTEMR</a> computes selected eigenvalues and, optionally, eigenvectors
</span><span class="comment">*</span><span class="comment"> of a real symmetric tridiagonal matrix T. Any such unreduced matrix has
</span><span class="comment">*</span><span class="comment"> a well defined set of pairwise different real eigenvalues, the corresponding
</span><span class="comment">*</span><span class="comment"> real eigenvectors are pairwise orthogonal.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The spectrum may be computed either completely or partially by specifying
</span><span class="comment">*</span><span class="comment"> either an interval (VL,VU] or a range of indices IL:IU for the desired
</span><span class="comment">*</span><span class="comment"> eigenvalues.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Depending on the number of desired eigenvalues, these are computed either
</span><span class="comment">*</span><span class="comment"> by bisection or the dqds algorithm. Numerically orthogonal eigenvectors are
</span><span class="comment">*</span><span class="comment"> computed by the use of various suitable L D L^T factorizations near clusters
</span><span class="comment">*</span><span class="comment"> of close eigenvalues (referred to as RRRs, Relatively Robust
</span><span class="comment">*</span><span class="comment"> Representations). An informal sketch of the algorithm follows.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> For each unreduced block (submatrix) of T,
</span><span class="comment">*</span><span class="comment"> (a) Compute T - sigma I = L D L^T, so that L and D
</span><span class="comment">*</span><span class="comment"> define all the wanted eigenvalues to high relative accuracy.
</span><span class="comment">*</span><span class="comment"> This means that small relative changes in the entries of D and L
</span><span class="comment">*</span><span class="comment"> cause only small relative changes in the eigenvalues and
</span><span class="comment">*</span><span class="comment"> eigenvectors. The standard (unfactored) representation of the
</span><span class="comment">*</span><span class="comment"> tridiagonal matrix T does not have this property in general.
</span><span class="comment">*</span><span class="comment"> (b) Compute the eigenvalues to suitable accuracy.
</span><span class="comment">*</span><span class="comment"> If the eigenvectors are desired, the algorithm attains full
</span><span class="comment">*</span><span class="comment"> accuracy of the computed eigenvalues only right before
</span><span class="comment">*</span><span class="comment"> the corresponding vectors have to be computed, see steps c) and d).
</span><span class="comment">*</span><span class="comment"> (c) For each cluster of close eigenvalues, select a new
</span><span class="comment">*</span><span class="comment"> shift close to the cluster, find a new factorization, and refine
</span><span class="comment">*</span><span class="comment"> the shifted eigenvalues to suitable accuracy.
</span><span class="comment">*</span><span class="comment"> (d) For each eigenvalue with a large enough relative separation compute
</span><span class="comment">*</span><span class="comment"> the corresponding eigenvector by forming a rank revealing twisted
</span><span class="comment">*</span><span class="comment"> factorization. Go back to (c) for any clusters that remain.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> For more details, see:
</span><span class="comment">*</span><span class="comment"> - Inderjit S. Dhillon and Beresford N. Parlett: "Multiple representations
</span><span class="comment">*</span><span class="comment"> to compute orthogonal eigenvectors of symmetric tridiagonal matrices,"
</span><span class="comment">*</span><span class="comment"> Linear Algebra and its Applications, 387(1), pp. 1-28, August 2004.
</span><span class="comment">*</span><span class="comment"> - Inderjit Dhillon and Beresford Parlett: "Orthogonal Eigenvectors and
</span><span class="comment">*</span><span class="comment"> Relative Gaps," SIAM Journal on Matrix Analysis and Applications, Vol. 25,
</span><span class="comment">*</span><span class="comment"> 2004. Also LAPACK Working Note 154.
</span><span class="comment">*</span><span class="comment"> - Inderjit Dhillon: "A new O(n^2) algorithm for the symmetric
</span><span class="comment">*</span><span class="comment"> tridiagonal eigenvalue/eigenvector problem",
</span><span class="comment">*</span><span class="comment"> Computer Science Division Technical Report No. UCB/CSD-97-971,
</span><span class="comment">*</span><span class="comment"> UC Berkeley, May 1997.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Notes:
</span><span class="comment">*</span><span class="comment"> 1.<a name="ZSTEMR.71"></a><a href="zstemr.f.html#ZSTEMR.1">ZSTEMR</a> works only on machines which follow IEEE-754
</span><span class="comment">*</span><span class="comment"> floating-point standard in their handling of infinities and NaNs.
</span><span class="comment">*</span><span class="comment"> This permits the use of efficient inner loops avoiding a check for
</span><span class="comment">*</span><span class="comment"> zero divisors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> 2. LAPACK routines can be used to reduce a complex Hermitean matrix to
</span><span class="comment">*</span><span class="comment"> real symmetric tridiagonal form.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> (Any complex Hermitean tridiagonal matrix has real values on its diagonal
</span><span class="comment">*</span><span class="comment"> and potentially complex numbers on its off-diagonals. By applying a
</span><span class="comment">*</span><span class="comment"> similarity transform with an appropriate diagonal matrix
</span><span class="comment">*</span><span class="comment"> diag(1,e^{i \phy_1}, ... , e^{i \phy_{n-1}}), the complex Hermitean
</span><span class="comment">*</span><span class="comment"> matrix can be transformed into a real symmetric matrix and complex
</span><span class="comment">*</span><span class="comment"> arithmetic can be entirely avoided.)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> While the eigenvectors of the real symmetric tridiagonal matrix are real,
</span><span class="comment">*</span><span class="comment"> the eigenvectors of original complex Hermitean matrix have complex entries
</span><span class="comment">*</span><span class="comment"> in general.
</span><span class="comment">*</span><span class="comment"> Since LAPACK drivers overwrite the matrix data with the eigenvectors,
</span><span class="comment">*</span><span class="comment"> <a name="ZSTEMR.90"></a><a href="zstemr.f.html#ZSTEMR.1">ZSTEMR</a> accepts complex workspace to facilitate interoperability
</span><span class="comment">*</span><span class="comment"> with <a name="ZUNMTR.91"></a><a href="zunmtr.f.html#ZUNMTR.1">ZUNMTR</a> or <a name="ZUPMTR.91"></a><a href="zupmtr.f.html#ZUPMTR.1">ZUPMTR</a>.
</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"> JOBZ (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'N': Compute eigenvalues only;
</span><span class="comment">*</span><span class="comment"> = 'V': Compute eigenvalues and eigenvectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RANGE (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> = 'A': all eigenvalues will be found.
</span><span class="comment">*</span><span class="comment"> = 'V': all eigenvalues in the half-open interval (VL,VU]
</span><span class="comment">*</span><span class="comment"> will be found.
</span><span class="comment">*</span><span class="comment"> = 'I': the IL-th through IU-th eigenvalues will be found.
</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. N >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> D (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> On entry, the N diagonal elements of the tridiagonal matrix
</span><span class="comment">*</span><span class="comment"> T. On exit, D is overwritten.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> E (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> On entry, the (N-1) subdiagonal elements of the tridiagonal
</span><span class="comment">*</span><span class="comment"> matrix T in elements 1 to N-1 of E. E(N) need not be set on
</span><span class="comment">*</span><span class="comment"> input, but is used internally as workspace.
</span><span class="comment">*</span><span class="comment"> On exit, E is overwritten.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VL (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> VU (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> If RANGE='V', the lower and upper bounds of the interval to
</span><span class="comment">*</span><span class="comment"> be searched for eigenvalues. VL < VU.
</span><span class="comment">*</span><span class="comment"> Not referenced if RANGE = 'A' or 'I'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IL (input) INTEGER
</span><span class="comment">*</span><span class="comment"> IU (input) INTEGER
</span><span class="comment">*</span><span class="comment"> If RANGE='I', the indices (in ascending order) of the
</span><span class="comment">*</span><span class="comment"> smallest and largest eigenvalues to be returned.
</span><span class="comment">*</span><span class="comment"> 1 <= IL <= IU <= N, if N > 0.
</span><span class="comment">*</span><span class="comment"> Not referenced if RANGE = 'A' or 'V'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> M (output) INTEGER
</span><span class="comment">*</span><span class="comment"> The total number of eigenvalues found. 0 <= M <= N.
</span><span class="comment">*</span><span class="comment"> If RANGE = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> W (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The first M elements contain the selected eigenvalues in
</span><span class="comment">*</span><span class="comment"> ascending order.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z (output) COMPLEX*16 array, dimension (LDZ, max(1,M) )
</span><span class="comment">*</span><span class="comment"> If JOBZ = 'V', and if INFO = 0, then the first M columns of Z
</span><span class="comment">*</span><span class="comment"> contain the orthonormal eigenvectors of the matrix T
</span><span class="comment">*</span><span class="comment"> corresponding to the selected eigenvalues, with the i-th
</span><span class="comment">*</span><span class="comment"> column of Z holding the eigenvector associated with W(i).
</span><span class="comment">*</span><span class="comment"> If JOBZ = 'N', then Z is not referenced.
</span><span class="comment">*</span><span class="comment"> Note: the user must ensure that at least max(1,M) columns are
</span><span class="comment">*</span><span class="comment"> supplied in the array Z; if RANGE = 'V', the exact value of M
</span><span class="comment">*</span><span class="comment"> is not known in advance and can be computed with a workspace
</span><span class="comment">*</span><span class="comment"> query by setting NZC = -1, see 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. LDZ >= 1, and if
</span><span class="comment">*</span><span class="comment"> JOBZ = 'V', then LDZ >= max(1,N).
</span><span class="comment">*</span><span class="comment">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?