zlarrv.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 881 行 · 第 1/5 页
HTML
881 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>zlarrv.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="ZLARRV.1"></a><a href="zlarrv.f.html#ZLARRV.1">ZLARRV</a>( N, VL, VU, D, L, PIVMIN,
$ ISPLIT, M, DOL, DOU, MINRGP,
$ RTOL1, RTOL2, W, WERR, WGAP,
$ IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
$ WORK, IWORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK auxiliary routine (version 3.1.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 DOL, DOU, INFO, LDZ, M, N
DOUBLE PRECISION MINRGP, PIVMIN, RTOL1, RTOL2, VL, VU
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> INTEGER IBLOCK( * ), INDEXW( * ), ISPLIT( * ),
$ ISUPPZ( * ), IWORK( * )
DOUBLE PRECISION D( * ), GERS( * ), L( * ), W( * ), WERR( * ),
$ WGAP( * ), 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="ZLARRV.26"></a><a href="zlarrv.f.html#ZLARRV.1">ZLARRV</a> computes the eigenvectors of the tridiagonal matrix
</span><span class="comment">*</span><span class="comment"> T = L D L^T given L, D and APPROXIMATIONS to the eigenvalues of L D L^T.
</span><span class="comment">*</span><span class="comment"> The input eigenvalues should have been computed by <a name="DLARRE.28"></a><a href="dlarre.f.html#DLARRE.1">DLARRE</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"> 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"> VL (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> VU (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> Lower and upper bounds of the interval that contains the desired
</span><span class="comment">*</span><span class="comment"> eigenvalues. VL < VU. Needed to compute gaps on the left or right
</span><span class="comment">*</span><span class="comment"> end of the extremal eigenvalues in the desired RANGE.
</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 diagonal matrix D.
</span><span class="comment">*</span><span class="comment"> On exit, D may be overwritten.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> L (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> On entry, the (N-1) subdiagonal elements of the unit
</span><span class="comment">*</span><span class="comment"> bidiagonal matrix L are in elements 1 to N-1 of L
</span><span class="comment">*</span><span class="comment"> (if the matrix is not splitted.) At the end of each block
</span><span class="comment">*</span><span class="comment"> is stored the corresponding shift as given by <a name="DLARRE.50"></a><a href="dlarre.f.html#DLARRE.1">DLARRE</a>.
</span><span class="comment">*</span><span class="comment"> On exit, L is overwritten.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> PIVMIN (in) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> The minimum pivot allowed in the Sturm sequence.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ISPLIT (input) INTEGER array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The splitting points, at which T breaks up into blocks.
</span><span class="comment">*</span><span class="comment"> The first block consists of rows/columns 1 to
</span><span class="comment">*</span><span class="comment"> ISPLIT( 1 ), the second of rows/columns ISPLIT( 1 )+1
</span><span class="comment">*</span><span class="comment"> through ISPLIT( 2 ), etc.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> M (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The total number of input eigenvalues. 0 <= M <= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> DOL (input) INTEGER
</span><span class="comment">*</span><span class="comment"> DOU (input) INTEGER
</span><span class="comment">*</span><span class="comment"> If the user wants to compute only selected eigenvectors from all
</span><span class="comment">*</span><span class="comment"> the eigenvalues supplied, he can specify an index range DOL:DOU.
</span><span class="comment">*</span><span class="comment"> Or else the setting DOL=1, DOU=M should be applied.
</span><span class="comment">*</span><span class="comment"> Note that DOL and DOU refer to the order in which the eigenvalues
</span><span class="comment">*</span><span class="comment"> are stored in W.
</span><span class="comment">*</span><span class="comment"> If the user wants to compute only selected eigenpairs, then
</span><span class="comment">*</span><span class="comment"> the columns DOL-1 to DOU+1 of the eigenvector space Z contain the
</span><span class="comment">*</span><span class="comment"> computed eigenvectors. All other columns of Z are set to zero.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> MINRGP (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RTOL1 (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> RTOL2 (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> Parameters for bisection.
</span><span class="comment">*</span><span class="comment"> An interval [LEFT,RIGHT] has converged if
</span><span class="comment">*</span><span class="comment"> RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> W (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The first M elements of W contain the APPROXIMATE eigenvalues for
</span><span class="comment">*</span><span class="comment"> which eigenvectors are to be computed. The eigenvalues
</span><span class="comment">*</span><span class="comment"> should be grouped by split-off block and ordered from
</span><span class="comment">*</span><span class="comment"> smallest to largest within the block ( The output array
</span><span class="comment">*</span><span class="comment"> W from <a name="DLARRE.89"></a><a href="dlarre.f.html#DLARRE.1">DLARRE</a> is expected here ). Furthermore, they are with
</span><span class="comment">*</span><span class="comment"> respect to the shift of the corresponding root representation
</span><span class="comment">*</span><span class="comment"> for their block. On exit, W holds the eigenvalues of the
</span><span class="comment">*</span><span class="comment"> UNshifted matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WERR (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The first M elements contain the semiwidth of the uncertainty
</span><span class="comment">*</span><span class="comment"> interval of the corresponding eigenvalue in W
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WGAP (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The separation from the right neighbor eigenvalue in W.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IBLOCK (input) INTEGER array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The indices of the blocks (submatrices) associated with the
</span><span class="comment">*</span><span class="comment"> corresponding eigenvalues in W; IBLOCK(i)=1 if eigenvalue
</span><span class="comment">*</span><span class="comment"> W(i) belongs to the first block from the top, =2 if W(i)
</span><span class="comment">*</span><span class="comment"> belongs to the second block, etc.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> INDEXW (input) INTEGER array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The indices of the eigenvalues within each block (submatrix);
</span><span class="comment">*</span><span class="comment"> for example, INDEXW(i)= 10 and IBLOCK(i)=2 imply that the
</span><span class="comment">*</span><span class="comment"> i-th eigenvalue W(i) is the 10-th eigenvalue in the second block.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> GERS (input) DOUBLE PRECISION array, dimension (2*N)
</span><span class="comment">*</span><span class="comment"> The N Gerschgorin intervals (the i-th Gerschgorin interval
</span><span class="comment">*</span><span class="comment"> is (GERS(2*i-1), GERS(2*i)). The Gerschgorin intervals should
</span><span class="comment">*</span><span class="comment"> be computed from the original UNshifted matrix.
</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 INFO = 0, the first M columns of Z contain the
</span><span class="comment">*</span><span class="comment"> orthonormal eigenvectors of the matrix T
</span><span class="comment">*</span><span class="comment"> corresponding to the input 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"> 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.
</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', LDZ >= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ISUPPZ (output) INTEGER array, dimension ( 2*max(1,M) )
</span><span class="comment">*</span><span class="comment"> The support of the eigenvectors in Z, i.e., the indices
</span><span class="comment">*</span><span class="comment"> indicating the nonzero elements in Z. The I-th eigenvector
</span><span class="comment">*</span><span class="comment"> is nonzero only in elements ISUPPZ( 2*I-1 ) through
</span><span class="comment">*</span><span class="comment"> ISUPPZ( 2*I ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace) DOUBLE PRECISION array, dimension (12*N)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IWORK (workspace) INTEGER array, dimension (7*N)
</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">
</span><span class="comment">*</span><span class="comment"> > 0: A problem occured in <a name="ZLARRV.142"></a><a href="zlarrv.f.html#ZLARRV.1">ZLARRV</a>.
</span><span class="comment">*</span><span class="comment"> < 0: One of the called subroutines signaled an internal problem.
</span><span class="comment">*</span><span class="comment"> Needs inspection of the corresponding parameter IINFO
</span><span class="comment">*</span><span class="comment"> for further information.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> =-1: Problem in <a name="DLARRB.147"></a><a href="dlarrb.f.html#DLARRB.1">DLARRB</a> when refining a child's eigenvalues.
</span><span class="comment">*</span><span class="comment"> =-2: Problem in <a name="DLARRF.148"></a><a href="dlarrf.f.html#DLARRF.1">DLARRF</a> when computing the RRR of a child.
</span><span class="comment">*</span><span class="comment"> When a child is inside a tight cluster, it can be difficult
</span><span class="comment">*</span><span class="comment"> to find an RRR. A partial remedy from the user's point of
</span><span class="comment">*</span><span class="comment"> view is to make the parameter MINRGP smaller and recompile.
</span><span class="comment">*</span><span class="comment"> However, as the orthogonality of the computed vectors is
</span><span class="comment">*</span><span class="comment"> proportional to 1/MINRGP, the user should be aware that
</span><span class="comment">*</span><span class="comment"> he might be trading in precision when he decreases MINRGP.
</span><span class="comment">*</span><span class="comment"> =-3: Problem in <a name="DLARRB.155"></a><a href="dlarrb.f.html#DLARRB.1">DLARRB</a> when refining a single eigenvalue
</span><span class="comment">*</span><span class="comment"> after the Rayleigh correction was rejected.
</span><span class="comment">*</span><span class="comment"> = 5: The Rayleigh Quotient Iteration failed to converge to
</span><span class="comment">*</span><span class="comment"> full accuracy in MAXITR steps.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?