dlarre.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 773 行 · 第 1/4 页
HTML
773 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dlarre.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="DLARRE.1"></a><a href="dlarre.f.html#DLARRE.1">DLARRE</a>( RANGE, N, VL, VU, IL, IU, D, E, E2,
$ RTOL1, RTOL2, SPLTOL, NSPLIT, ISPLIT, M,
$ W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN,
$ WORK, IWORK, INFO )
IMPLICIT NONE
<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> CHARACTER RANGE
INTEGER IL, INFO, IU, M, N, NSPLIT
DOUBLE PRECISION PIVMIN, RTOL1, RTOL2, SPLTOL, VL, VU
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> INTEGER IBLOCK( * ), ISPLIT( * ), IWORK( * ),
$ INDEXW( * )
DOUBLE PRECISION D( * ), E( * ), E2( * ), GERS( * ),
$ W( * ),WERR( * ), WGAP( * ), WORK( * )
<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"> To find the desired eigenvalues of a given real symmetric
</span><span class="comment">*</span><span class="comment"> tridiagonal matrix T, <a name="DLARRE.27"></a><a href="dlarre.f.html#DLARRE.1">DLARRE</a> sets any "small" off-diagonal
</span><span class="comment">*</span><span class="comment"> elements to zero, and for each unreduced block T_i, it finds
</span><span class="comment">*</span><span class="comment"> (a) a suitable shift at one end of the block's spectrum,
</span><span class="comment">*</span><span class="comment"> (b) the base representation, T_i - sigma_i I = L_i D_i L_i^T, and
</span><span class="comment">*</span><span class="comment"> (c) eigenvalues of each L_i D_i L_i^T.
</span><span class="comment">*</span><span class="comment"> The representations and eigenvalues found are then used by
</span><span class="comment">*</span><span class="comment"> <a name="DSTEMR.33"></a><a href="dstemr.f.html#DSTEMR.1">DSTEMR</a> to compute the eigenvectors of T.
</span><span class="comment">*</span><span class="comment"> The accuracy varies depending on whether bisection is used to
</span><span class="comment">*</span><span class="comment"> find a few eigenvalues or the dqds algorithm (subroutine <a name="DLASQ2.35"></a><a href="dlasq2.f.html#DLASQ2.1">DLASQ2</a>) to
</span><span class="comment">*</span><span class="comment"> conpute all and then discard any unwanted one.
</span><span class="comment">*</span><span class="comment"> As an added benefit, <a name="DLARRE.37"></a><a href="dlarre.f.html#DLARRE.1">DLARRE</a> also outputs the n
</span><span class="comment">*</span><span class="comment"> Gerschgorin intervals for the matrices L_i D_i L_i^T.
</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"> RANGE (input) CHARACTER
</span><span class="comment">*</span><span class="comment"> = 'A': ("All") all eigenvalues will be found.
</span><span class="comment">*</span><span class="comment"> = 'V': ("Value") all eigenvalues in the half-open interval
</span><span class="comment">*</span><span class="comment"> (VL, VU] will be found.
</span><span class="comment">*</span><span class="comment"> = 'I': ("Index") the IL-th through IU-th eigenvalues (of the
</span><span class="comment">*</span><span class="comment"> entire matrix) 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"> VL (input/output) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> VU (input/output) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> If RANGE='V', the lower and upper bounds for the eigenvalues.
</span><span class="comment">*</span><span class="comment"> Eigenvalues less than or equal to VL, or greater than VU,
</span><span class="comment">*</span><span class="comment"> will not be returned. VL < VU.
</span><span class="comment">*</span><span class="comment"> If RANGE='I' or ='A', <a name="DLARRE.58"></a><a href="dlarre.f.html#DLARRE.1">DLARRE</a> computes bounds on the desired
</span><span class="comment">*</span><span class="comment"> part of the spectrum.
</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.
</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
</span><span class="comment">*</span><span class="comment"> matrix T.
</span><span class="comment">*</span><span class="comment"> On exit, the N diagonal elements of the diagonal
</span><span class="comment">*</span><span class="comment"> matrices D_i.
</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 first (N-1) entries contain the subdiagonal
</span><span class="comment">*</span><span class="comment"> elements of the tridiagonal matrix T; E(N) need not be set.
</span><span class="comment">*</span><span class="comment"> On exit, E contains the subdiagonal elements of the unit
</span><span class="comment">*</span><span class="comment"> bidiagonal matrices L_i. The entries E( ISPLIT( I ) ),
</span><span class="comment">*</span><span class="comment"> 1 <= I <= NSPLIT, contain the base points sigma_i on output.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> E2 (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> On entry, the first (N-1) entries contain the SQUARES of the
</span><span class="comment">*</span><span class="comment"> subdiagonal elements of the tridiagonal matrix T;
</span><span class="comment">*</span><span class="comment"> E2(N) need not be set.
</span><span class="comment">*</span><span class="comment"> On exit, the entries E2( ISPLIT( I ) ),
</span><span class="comment">*</span><span class="comment"> 1 <= I <= NSPLIT, have been set to zero
</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"> SPLTOL (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> The threshold for splitting.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> NSPLIT (output) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of blocks T splits into. 1 <= NSPLIT <= N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ISPLIT (output) 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 ISPLIT(1),
</span><span class="comment">*</span><span class="comment"> the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
</span><span class="comment">*</span><span class="comment"> etc., and the NSPLIT-th consists of rows/columns
</span><span class="comment">*</span><span class="comment"> ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
</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 (of all L_i D_i L_i^T)
</span><span class="comment">*</span><span class="comment"> found.
</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 eigenvalues. The
</span><span class="comment">*</span><span class="comment"> eigenvalues of each of the blocks, L_i D_i L_i^T, are
</span><span class="comment">*</span><span class="comment"> sorted in ascending order ( <a name="DLARRE.113"></a><a href="dlarre.f.html#DLARRE.1">DLARRE</a> may use the
</span><span class="comment">*</span><span class="comment"> remaining N-M elements as workspace).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WERR (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The error bound on the corresponding eigenvalue in W.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WGAP (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"> The gap is only with respect to the eigenvalues of the same block
</span><span class="comment">*</span><span class="comment"> as each block has its own representation tree.
</span><span class="comment">*</span><span class="comment"> Exception: at the right end of a block we store the left gap
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IBLOCK (output) 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 (output) 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 block 2
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> GERS (output) 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)).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> PIVMIN (output) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> The minimum pivot in the Sturm sequence for T.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace) DOUBLE PRECISION array, dimension (6*N)
</span><span class="comment">*</span><span class="comment"> Workspace.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IWORK (workspace) INTEGER array, dimension (5*N)
</span><span class="comment">*</span><span class="comment"> Workspace.
</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: A problem occured in <a name="DLARRE.151"></a><a href="dlarre.f.html#DLARRE.1">DLARRE</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="DLARRD.156"></a><a href="dlarrd.f.html#DLARRD.1">DLARRD</a>.
</span><span class="comment">*</span><span class="comment"> = 2: No base representation could be found in MAXTRY iterations.
</span><span class="comment">*</span><span class="comment"> Increasing MAXTRY and recompilation might be a remedy.
</span><span class="comment">*</span><span class="comment"> =-3: Problem in <a name="DLARRB.159"></a><a href="dlarrb.f.html#DLARRB.1">DLARRB</a> when computing the refined root
</span><span class="comment">*</span><span class="comment"> representation for <a name="DLASQ2.160"></a><a href="dlasq2.f.html#DLASQ2.1">DLASQ2</a>.
</span><span class="comment">*</span><span class="comment"> =-4: Problem in <a name="DLARRB.161"></a><a href="dlarrb.f.html#DLARRB.1">DLARRB</a> when preforming bisection on the
</span><span class="comment">*</span><span class="comment"> desired part of the spectrum.
</span><span class="comment">*</span><span class="comment"> =-5: Problem in <a name="DLASQ2.163"></a><a href="dlasq2.f.html#DLASQ2.1">DLASQ2</a>.
</span><span class="comment">*</span><span class="comment"> =-6: Problem in <a name="DLASQ2.164"></a><a href="dlasq2.f.html#DLASQ2.1">DLASQ2</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Further Details
</span><span class="comment">*</span><span class="comment"> The base representations are required to suffer very little
</span><span class="comment">*</span><span class="comment"> element growth and consequently define all their eigenvalues to
</span><span class="comment">*</span><span class="comment"> high relative accuracy.
</span><span class="comment">*</span><span class="comment"> ===============
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Based on contributions by
</span><span class="comment">*</span><span class="comment"> Beresford Parlett, University of California, Berkeley, USA
</span><span class="comment">*</span><span class="comment"> Jim Demmel, University of California, Berkeley, USA
</span><span class="comment">*</span><span class="comment"> Inderjit Dhillon, University of Texas, Austin, USA
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?