dlaed3.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 289 行 · 第 1/2 页
HTML
289 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dlaed3.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="DLAED3.1"></a><a href="dlaed3.f.html#DLAED3.1">DLAED3</a>( K, N, N1, D, Q, LDQ, RHO, DLAMDA, Q2, INDX,
$ CTOT, W, S, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK 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> INTEGER INFO, K, LDQ, N, N1
DOUBLE PRECISION RHO
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> INTEGER CTOT( * ), INDX( * )
DOUBLE PRECISION D( * ), DLAMDA( * ), Q( LDQ, * ), Q2( * ),
$ S( * ), W( * )
<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="DLAED3.21"></a><a href="dlaed3.f.html#DLAED3.1">DLAED3</a> finds the roots of the secular equation, as defined by the
</span><span class="comment">*</span><span class="comment"> values in D, W, and RHO, between 1 and K. It makes the
</span><span class="comment">*</span><span class="comment"> appropriate calls to <a name="DLAED4.23"></a><a href="dlaed4.f.html#DLAED4.1">DLAED4</a> and then updates the eigenvectors by
</span><span class="comment">*</span><span class="comment"> multiplying the matrix of eigenvectors of the pair of eigensystems
</span><span class="comment">*</span><span class="comment"> being combined by the matrix of eigenvectors of the K-by-K system
</span><span class="comment">*</span><span class="comment"> which is solved here.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> This code makes very mild assumptions about floating point
</span><span class="comment">*</span><span class="comment"> arithmetic. It will work on machines with a guard digit in
</span><span class="comment">*</span><span class="comment"> add/subtract, or on those binary machines without guard digits
</span><span class="comment">*</span><span class="comment"> which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
</span><span class="comment">*</span><span class="comment"> It could conceivably fail on hexadecimal or decimal machines
</span><span class="comment">*</span><span class="comment"> without guard digits, but we know of none.
</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"> K (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of terms in the rational function to be solved by
</span><span class="comment">*</span><span class="comment"> <a name="DLAED4.40"></a><a href="dlaed4.f.html#DLAED4.1">DLAED4</a>. K >= 0.
</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 number of rows and columns in the Q matrix.
</span><span class="comment">*</span><span class="comment"> N >= K (deflation may result in N>K).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> N1 (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The location of the last eigenvalue in the leading submatrix.
</span><span class="comment">*</span><span class="comment"> min(1,N) <= N1 <= N/2.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> D (output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> D(I) contains the updated eigenvalues for
</span><span class="comment">*</span><span class="comment"> 1 <= I <= K.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Q (output) DOUBLE PRECISION array, dimension (LDQ,N)
</span><span class="comment">*</span><span class="comment"> Initially the first K columns are used as workspace.
</span><span class="comment">*</span><span class="comment"> On output the columns 1 to K contain
</span><span class="comment">*</span><span class="comment"> the updated eigenvectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDQ (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array Q. LDQ >= max(1,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> RHO (input) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment"> The value of the parameter in the rank one update equation.
</span><span class="comment">*</span><span class="comment"> RHO >= 0 required.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> DLAMDA (input/output) DOUBLE PRECISION array, dimension (K)
</span><span class="comment">*</span><span class="comment"> The first K elements of this array contain the old roots
</span><span class="comment">*</span><span class="comment"> of the deflated updating problem. These are the poles
</span><span class="comment">*</span><span class="comment"> of the secular equation. May be changed on output by
</span><span class="comment">*</span><span class="comment"> having lowest order bit set to zero on Cray X-MP, Cray Y-MP,
</span><span class="comment">*</span><span class="comment"> Cray-2, or Cray C-90, as described above.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Q2 (input) DOUBLE PRECISION array, dimension (LDQ2, N)
</span><span class="comment">*</span><span class="comment"> The first K columns of this matrix contain the non-deflated
</span><span class="comment">*</span><span class="comment"> eigenvectors for the split problem.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> INDX (input) INTEGER array, dimension (N)
</span><span class="comment">*</span><span class="comment"> The permutation used to arrange the columns of the deflated
</span><span class="comment">*</span><span class="comment"> Q matrix into three groups (see <a name="DLAED2.79"></a><a href="dlaed2.f.html#DLAED2.1">DLAED2</a>).
</span><span class="comment">*</span><span class="comment"> The rows of the eigenvectors found by <a name="DLAED4.80"></a><a href="dlaed4.f.html#DLAED4.1">DLAED4</a> must be likewise
</span><span class="comment">*</span><span class="comment"> permuted before the matrix multiply can take place.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> CTOT (input) INTEGER array, dimension (4)
</span><span class="comment">*</span><span class="comment"> A count of the total number of the various types of columns
</span><span class="comment">*</span><span class="comment"> in Q, as described in INDX. The fourth column type is any
</span><span class="comment">*</span><span class="comment"> column which has been deflated.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> W (input/output) DOUBLE PRECISION array, dimension (K)
</span><span class="comment">*</span><span class="comment"> The first K elements of this array contain the components
</span><span class="comment">*</span><span class="comment"> of the deflation-adjusted updating vector. Destroyed on
</span><span class="comment">*</span><span class="comment"> output.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> S (workspace) DOUBLE PRECISION array, dimension (N1 + 1)*K
</span><span class="comment">*</span><span class="comment"> Will contain the eigenvectors of the repaired matrix which
</span><span class="comment">*</span><span class="comment"> will be multiplied by the previously accumulated eigenvectors
</span><span class="comment">*</span><span class="comment"> to update the system.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDS (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of S. LDS >= max(1,K).
</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 = 1, an eigenvalue did not converge
</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"> ===============
</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"> Jeff Rutter, Computer Science Division, University of California
</span><span class="comment">*</span><span class="comment"> at Berkeley, USA
</span><span class="comment">*</span><span class="comment"> Modified by Francoise Tisseur, University of Tennessee.
</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> DOUBLE PRECISION ONE, ZERO
PARAMETER ( ONE = 1.0D0, ZERO = 0.0D0 )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Local Scalars ..
</span> INTEGER I, II, IQ2, J, N12, N2, N23
DOUBLE PRECISION TEMP
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Functions ..
</span> DOUBLE PRECISION <a name="DLAMC3.125"></a><a href="dlamch.f.html#DLAMC3.574">DLAMC3</a>, DNRM2
EXTERNAL <a name="DLAMC3.126"></a><a href="dlamch.f.html#DLAMC3.574">DLAMC3</a>, DNRM2
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?