slasd8.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 278 行 · 第 1/2 页
HTML
278 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>slasd8.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="SLASD8.1"></a><a href="slasd8.f.html#SLASD8.1">SLASD8</a>( ICOMPQ, K, D, Z, VF, VL, DIFL, DIFR, LDDIFR,
$ DSIGMA, WORK, INFO )
<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> INTEGER ICOMPQ, INFO, K, LDDIFR
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> REAL D( * ), DIFL( * ), DIFR( LDDIFR, * ),
$ DSIGMA( * ), VF( * ), VL( * ), WORK( * ),
$ Z( * )
<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="SLASD8.20"></a><a href="slasd8.f.html#SLASD8.1">SLASD8</a> finds the square roots of the roots of the secular equation,
</span><span class="comment">*</span><span class="comment"> as defined by the values in DSIGMA and Z. It makes the appropriate
</span><span class="comment">*</span><span class="comment"> calls to <a name="SLASD4.22"></a><a href="slasd4.f.html#SLASD4.1">SLASD4</a>, and stores, for each element in D, the distance
</span><span class="comment">*</span><span class="comment"> to its two nearest poles (elements in DSIGMA). It also updates
</span><span class="comment">*</span><span class="comment"> the arrays VF and VL, the first and last components of all the
</span><span class="comment">*</span><span class="comment"> right singular vectors of the original bidiagonal matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> <a name="SLASD8.27"></a><a href="slasd8.f.html#SLASD8.1">SLASD8</a> is called from <a name="SLASD6.27"></a><a href="slasd6.f.html#SLASD6.1">SLASD6</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"> ICOMPQ (input) INTEGER
</span><span class="comment">*</span><span class="comment"> Specifies whether singular vectors are to be computed in
</span><span class="comment">*</span><span class="comment"> factored form in the calling routine:
</span><span class="comment">*</span><span class="comment"> = 0: Compute singular values only.
</span><span class="comment">*</span><span class="comment"> = 1: Compute singular vectors in factored form as well.
</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
</span><span class="comment">*</span><span class="comment"> by <a name="SLASD4.40"></a><a href="slasd4.f.html#SLASD4.1">SLASD4</a>. K >= 1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> D (output) REAL array, dimension ( K )
</span><span class="comment">*</span><span class="comment"> On output, D contains the updated singular values.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z (input) REAL 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 row vector.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VF (input/output) REAL array, dimension ( K )
</span><span class="comment">*</span><span class="comment"> On entry, VF contains information passed through DBEDE8.
</span><span class="comment">*</span><span class="comment"> On exit, VF contains the first K components of the first
</span><span class="comment">*</span><span class="comment"> components of all right singular vectors of the bidiagonal
</span><span class="comment">*</span><span class="comment"> matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VL (input/output) REAL array, dimension ( K )
</span><span class="comment">*</span><span class="comment"> On entry, VL contains information passed through DBEDE8.
</span><span class="comment">*</span><span class="comment"> On exit, VL contains the first K components of the last
</span><span class="comment">*</span><span class="comment"> components of all right singular vectors of the bidiagonal
</span><span class="comment">*</span><span class="comment"> matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> DIFL (output) REAL array, dimension ( K )
</span><span class="comment">*</span><span class="comment"> On exit, DIFL(I) = D(I) - DSIGMA(I).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> DIFR (output) REAL array,
</span><span class="comment">*</span><span class="comment"> dimension ( LDDIFR, 2 ) if ICOMPQ = 1 and
</span><span class="comment">*</span><span class="comment"> dimension ( K ) if ICOMPQ = 0.
</span><span class="comment">*</span><span class="comment"> On exit, DIFR(I,1) = D(I) - DSIGMA(I+1), DIFR(K,1) is not
</span><span class="comment">*</span><span class="comment"> defined and will not be referenced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> If ICOMPQ = 1, DIFR(1:K,2) is an array containing the
</span><span class="comment">*</span><span class="comment"> normalizing factors for the right singular vector matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDDIFR (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of DIFR, must be at least K.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> DSIGMA (input) REAL 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.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace) REAL array, dimension at least 3 * 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 singular value 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"> Ming Gu and Huan Ren, Computer Science Division, University of
</span><span class="comment">*</span><span class="comment"> California at Berkeley, USA
</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> REAL ONE
PARAMETER ( ONE = 1.0E+0 )
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Local Scalars ..
</span> INTEGER I, IWK1, IWK2, IWK2I, IWK3, IWK3I, J
REAL DIFLJ, DIFRJ, DJ, DSIGJ, DSIGJP, RHO, TEMP
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Subroutines ..
</span> EXTERNAL SCOPY, <a name="SLASCL.106"></a><a href="slascl.f.html#SLASCL.1">SLASCL</a>, <a name="SLASD4.106"></a><a href="slasd4.f.html#SLASD4.1">SLASD4</a>, <a name="SLASET.106"></a><a href="slaset.f.html#SLASET.1">SLASET</a>, <a name="XERBLA.106"></a><a href="xerbla.f.html#XERBLA.1">XERBLA</a>
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Functions ..
</span> REAL SDOT, <a name="SLAMC3.109"></a><a href="slamch.f.html#SLAMC3.574">SLAMC3</a>, SNRM2
EXTERNAL SDOT, <a name="SLAMC3.110"></a><a href="slamch.f.html#SLAMC3.574">SLAMC3</a>, SNRM2
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Intrinsic Functions ..
</span> INTRINSIC ABS, SIGN, SQRT
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Executable Statements ..
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Test the input parameters.
</span><span class="comment">*</span><span class="comment">
</span> INFO = 0
<span class="comment">*</span><span class="comment">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?