sstevr.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 485 行 · 第 1/3 页
HTML
485 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>sstevr.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="SSTEVR.1"></a><a href="sstevr.f.html#SSTEVR.1">SSTEVR</a>( JOBZ, RANGE, N, D, E, VL, VU, IL, IU, ABSTOL,
$ M, W, Z, LDZ, ISUPPZ, WORK, LWORK, IWORK,
$ LIWORK, 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 JOBZ, RANGE
INTEGER IL, INFO, IU, LDZ, LIWORK, LWORK, M, N
REAL ABSTOL, VL, VU
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> INTEGER ISUPPZ( * ), IWORK( * )
REAL D( * ), E( * ), W( * ), WORK( * ), 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="SSTEVR.22"></a><a href="sstevr.f.html#SSTEVR.1">SSTEVR</a> computes selected eigenvalues and, optionally, eigenvectors
</span><span class="comment">*</span><span class="comment"> of a real symmetric tridiagonal matrix T. Eigenvalues and
</span><span class="comment">*</span><span class="comment"> eigenvectors can be selected by specifying either a range of values
</span><span class="comment">*</span><span class="comment"> or a range of indices for the desired eigenvalues.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Whenever possible, <a name="SSTEVR.27"></a><a href="sstevr.f.html#SSTEVR.1">SSTEVR</a> calls <a name="SSTEMR.27"></a><a href="sstemr.f.html#SSTEMR.1">SSTEMR</a> to compute the
</span><span class="comment">*</span><span class="comment"> eigenspectrum using Relatively Robust Representations. <a name="SSTEMR.28"></a><a href="sstemr.f.html#SSTEMR.1">SSTEMR</a>
</span><span class="comment">*</span><span class="comment"> computes eigenvalues by the dqds algorithm, while orthogonal
</span><span class="comment">*</span><span class="comment"> eigenvectors are computed from various "good" L D L^T representations
</span><span class="comment">*</span><span class="comment"> (also known as Relatively Robust Representations). Gram-Schmidt
</span><span class="comment">*</span><span class="comment"> orthogonalization is avoided as far as possible. More specifically,
</span><span class="comment">*</span><span class="comment"> the various steps of the algorithm are as follows. For the i-th
</span><span class="comment">*</span><span class="comment"> unreduced block of T,
</span><span class="comment">*</span><span class="comment"> (a) Compute T - sigma_i = L_i D_i L_i^T, such that L_i D_i L_i^T
</span><span class="comment">*</span><span class="comment"> is a relatively robust representation,
</span><span class="comment">*</span><span class="comment"> (b) Compute the eigenvalues, lambda_j, of L_i D_i L_i^T to high
</span><span class="comment">*</span><span class="comment"> relative accuracy by the dqds algorithm,
</span><span class="comment">*</span><span class="comment"> (c) If there is a cluster of close eigenvalues, "choose" sigma_i
</span><span class="comment">*</span><span class="comment"> close to the cluster, and go to step (a),
</span><span class="comment">*</span><span class="comment"> (d) Given the approximate eigenvalue lambda_j of L_i D_i L_i^T,
</span><span class="comment">*</span><span class="comment"> compute the corresponding eigenvector by forming a
</span><span class="comment">*</span><span class="comment"> rank-revealing twisted factorization.
</span><span class="comment">*</span><span class="comment"> The desired accuracy of the output can be specified by the input
</span><span class="comment">*</span><span class="comment"> parameter ABSTOL.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> For more details, see "A new O(n^2) algorithm for the symmetric
</span><span class="comment">*</span><span class="comment"> tridiagonal eigenvalue/eigenvector problem", by Inderjit Dhillon,
</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">
</span><span class="comment">*</span><span class="comment"> Note 1 : <a name="SSTEVR.53"></a><a href="sstevr.f.html#SSTEVR.1">SSTEVR</a> calls <a name="SSTEMR.53"></a><a href="sstemr.f.html#SSTEMR.1">SSTEMR</a> when the full spectrum is requested
</span><span class="comment">*</span><span class="comment"> on machines which conform to the ieee-754 floating point standard.
</span><span class="comment">*</span><span class="comment"> <a name="SSTEVR.55"></a><a href="sstevr.f.html#SSTEVR.1">SSTEVR</a> calls <a name="SSTEBZ.55"></a><a href="sstebz.f.html#SSTEBZ.1">SSTEBZ</a> and <a name="SSTEIN.55"></a><a href="sstein.f.html#SSTEIN.1">SSTEIN</a> on non-ieee machines and
</span><span class="comment">*</span><span class="comment"> when partial spectrum requests are made.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Normal execution of <a name="SSTEMR.58"></a><a href="sstemr.f.html#SSTEMR.1">SSTEMR</a> may create NaNs and infinities and
</span><span class="comment">*</span><span class="comment"> hence may abort due to a floating point exception in environments
</span><span class="comment">*</span><span class="comment"> which do not handle NaNs and infinities in the ieee standard default
</span><span class="comment">*</span><span class="comment"> manner.
</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">********* For RANGE = 'V' or 'I' and IU - IL < N - 1, <a name="SSTEBZ.75"></a><a href="sstebz.f.html#SSTEBZ.1">SSTEBZ</a> and
</span><span class="comment">*</span><span class="comment">********* <a name="SSTEIN.76"></a><a href="sstein.f.html#SSTEIN.1">SSTEIN</a> are called
</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) REAL 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"> A.
</span><span class="comment">*</span><span class="comment"> On exit, D may be multiplied by a constant factor chosen
</span><span class="comment">*</span><span class="comment"> to avoid over/underflow in computing the eigenvalues.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> E (input/output) REAL array, dimension (max(1,N-1))
</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 A in elements 1 to N-1 of E.
</span><span class="comment">*</span><span class="comment"> On exit, E may be multiplied by a constant factor chosen
</span><span class="comment">*</span><span class="comment"> to avoid over/underflow in computing the eigenvalues.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VL (input) REAL
</span><span class="comment">*</span><span class="comment"> VU (input) REAL
</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; IL = 1 and IU = 0 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"> ABSTOL (input) REAL
</span><span class="comment">*</span><span class="comment"> The absolute error tolerance for the eigenvalues.
</span><span class="comment">*</span><span class="comment"> An approximate eigenvalue is accepted as converged
</span><span class="comment">*</span><span class="comment"> when it is determined to lie in an interval [a,b]
</span><span class="comment">*</span><span class="comment"> of width less than or equal to
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ABSTOL + EPS * max( |a|,|b| ) ,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> where EPS is the machine precision. If ABSTOL is less than
</span><span class="comment">*</span><span class="comment"> or equal to zero, then EPS*|T| will be used in its place,
</span><span class="comment">*</span><span class="comment"> where |T| is the 1-norm of the tridiagonal matrix obtained
</span><span class="comment">*</span><span class="comment"> by reducing A to tridiagonal form.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> See "Computing Small Singular Values of Bidiagonal Matrices
</span><span class="comment">*</span><span class="comment"> with Guaranteed High Relative Accuracy," by Demmel and
</span><span class="comment">*</span><span class="comment"> Kahan, LAPACK Working Note #3.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If high relative accuracy is important, set ABSTOL to
</span><span class="comment">*</span><span class="comment"> <a name="SLAMCH.124"></a><a href="slamch.f.html#SLAMCH.1">SLAMCH</a>( 'Safe minimum' ). Doing so will guarantee that
</span><span class="comment">*</span><span class="comment"> eigenvalues are computed to high relative accuracy when
</span><span class="comment">*</span><span class="comment"> possible in future releases. The current code does not
</span><span class="comment">*</span><span class="comment"> make any guarantees about high relative accuracy, but
</span><span class="comment">*</span><span class="comment"> future releases will. See J. Barlow and J. Demmel,
</span><span class="comment">*</span><span class="comment"> "Computing Accurate Eigensystems of Scaled Diagonally
</span><span class="comment">*</span><span class="comment"> Dominant Matrices", LAPACK Working Note #7, for a discussion
</span><span class="comment">*</span><span class="comment"> of which matrices define their eigenvalues to high relative
</span><span class="comment">*</span><span class="comment"> accuracy.
</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) REAL 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) REAL array, dimension (LDZ, max(1,M) )
</span><span class="comment">*</span><span class="comment"> If JOBZ = 'V', then if INFO = 0, the first M columns of Z
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?