slasd7.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 469 行 · 第 1/3 页
HTML
469 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>slasd7.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="SLASD7.1"></a><a href="slasd7.f.html#SLASD7.1">SLASD7</a>( ICOMPQ, NL, NR, SQRE, K, D, Z, ZW, VF, VFW, VL,
$ VLW, ALPHA, BETA, DSIGMA, IDX, IDXP, IDXQ,
$ PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
$ C, S, 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 GIVPTR, ICOMPQ, INFO, K, LDGCOL, LDGNUM, NL,
$ NR, SQRE
REAL ALPHA, BETA, C, S
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> INTEGER GIVCOL( LDGCOL, * ), IDX( * ), IDXP( * ),
$ IDXQ( * ), PERM( * )
REAL D( * ), DSIGMA( * ), GIVNUM( LDGNUM, * ),
$ VF( * ), VFW( * ), VL( * ), VLW( * ), Z( * ),
$ ZW( * )
<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="SLASD7.26"></a><a href="slasd7.f.html#SLASD7.1">SLASD7</a> merges the two sets of singular values together into a single
</span><span class="comment">*</span><span class="comment"> sorted set. Then it tries to deflate the size of the problem. There
</span><span class="comment">*</span><span class="comment"> are two ways in which deflation can occur: when two or more singular
</span><span class="comment">*</span><span class="comment"> values are close together or if there is a tiny entry in the Z
</span><span class="comment">*</span><span class="comment"> vector. For each such occurrence the order of the related
</span><span class="comment">*</span><span class="comment"> secular equation problem is reduced by one.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> <a name="SLASD7.33"></a><a href="slasd7.f.html#SLASD7.1">SLASD7</a> is called from <a name="SLASD6.33"></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
</span><span class="comment">*</span><span class="comment"> in compact form, as follows:
</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 of upper
</span><span class="comment">*</span><span class="comment"> bidiagonal matrix in compact form.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> NL (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The row dimension of the upper block. NL >= 1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> NR (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The row dimension of the lower block. NR >= 1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> SQRE (input) INTEGER
</span><span class="comment">*</span><span class="comment"> = 0: the lower block is an NR-by-NR square matrix.
</span><span class="comment">*</span><span class="comment"> = 1: the lower block is an NR-by-(NR+1) rectangular matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> The bidiagonal matrix has
</span><span class="comment">*</span><span class="comment"> N = NL + NR + 1 rows and
</span><span class="comment">*</span><span class="comment"> M = N + SQRE >= N columns.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> K (output) INTEGER
</span><span class="comment">*</span><span class="comment"> Contains the dimension of the non-deflated matrix, this is
</span><span class="comment">*</span><span class="comment"> the order of the related secular equation. 1 <= K <=N.
</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 D contains the singular values of the two submatrices
</span><span class="comment">*</span><span class="comment"> to be combined. On exit D contains the trailing (N-K) updated
</span><span class="comment">*</span><span class="comment"> singular values (those which were deflated) sorted into
</span><span class="comment">*</span><span class="comment"> increasing order.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z (output) REAL array, dimension ( M )
</span><span class="comment">*</span><span class="comment"> On exit Z contains the updating row vector in the secular
</span><span class="comment">*</span><span class="comment"> equation.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ZW (workspace) REAL array, dimension ( M )
</span><span class="comment">*</span><span class="comment"> Workspace for Z.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VF (input/output) REAL array, dimension ( M )
</span><span class="comment">*</span><span class="comment"> On entry, VF(1:NL+1) contains the first components of all
</span><span class="comment">*</span><span class="comment"> right singular vectors of the upper block; and VF(NL+2:M)
</span><span class="comment">*</span><span class="comment"> contains the first components of all right singular vectors
</span><span class="comment">*</span><span class="comment"> of the lower block. On exit, VF contains the first components
</span><span class="comment">*</span><span class="comment"> of all right singular vectors of the bidiagonal matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VFW (workspace) REAL array, dimension ( M )
</span><span class="comment">*</span><span class="comment"> Workspace for VF.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VL (input/output) REAL array, dimension ( M )
</span><span class="comment">*</span><span class="comment"> On entry, VL(1:NL+1) contains the last components of all
</span><span class="comment">*</span><span class="comment"> right singular vectors of the upper block; and VL(NL+2:M)
</span><span class="comment">*</span><span class="comment"> contains the last components of all right singular vectors
</span><span class="comment">*</span><span class="comment"> of the lower block. On exit, VL contains the last components
</span><span class="comment">*</span><span class="comment"> of all right singular vectors of the bidiagonal matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VLW (workspace) REAL array, dimension ( M )
</span><span class="comment">*</span><span class="comment"> Workspace for VL.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> ALPHA (input) REAL
</span><span class="comment">*</span><span class="comment"> Contains the diagonal element associated with the added row.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> BETA (input) REAL
</span><span class="comment">*</span><span class="comment"> Contains the off-diagonal element associated with the added
</span><span class="comment">*</span><span class="comment"> row.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> DSIGMA (output) REAL array, dimension ( N )
</span><span class="comment">*</span><span class="comment"> Contains a copy of the diagonal elements (K-1 singular values
</span><span class="comment">*</span><span class="comment"> and one zero) in the secular equation.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IDX (workspace) INTEGER array, dimension ( N )
</span><span class="comment">*</span><span class="comment"> This will contain the permutation used to sort the contents of
</span><span class="comment">*</span><span class="comment"> D into ascending order.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IDXP (workspace) INTEGER array, dimension ( N )
</span><span class="comment">*</span><span class="comment"> This will contain the permutation used to place deflated
</span><span class="comment">*</span><span class="comment"> values of D at the end of the array. On output IDXP(2:K)
</span><span class="comment">*</span><span class="comment"> points to the nondeflated D-values and IDXP(K+1:N)
</span><span class="comment">*</span><span class="comment"> points to the deflated singular values.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IDXQ (input) INTEGER array, dimension ( N )
</span><span class="comment">*</span><span class="comment"> This contains the permutation which separately sorts the two
</span><span class="comment">*</span><span class="comment"> sub-problems in D into ascending order. Note that entries in
</span><span class="comment">*</span><span class="comment"> the first half of this permutation must first be moved one
</span><span class="comment">*</span><span class="comment"> position backward; and entries in the second half
</span><span class="comment">*</span><span class="comment"> must first have NL+1 added to their values.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> PERM (output) INTEGER array, dimension ( N )
</span><span class="comment">*</span><span class="comment"> The permutations (from deflation and sorting) to be applied
</span><span class="comment">*</span><span class="comment"> to each singular block. Not referenced if ICOMPQ = 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> GIVPTR (output) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of Givens rotations which took place in this
</span><span class="comment">*</span><span class="comment"> subproblem. Not referenced if ICOMPQ = 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> GIVCOL (output) INTEGER array, dimension ( LDGCOL, 2 )
</span><span class="comment">*</span><span class="comment"> Each pair of numbers indicates a pair of columns to take place
</span><span class="comment">*</span><span class="comment"> in a Givens rotation. Not referenced if ICOMPQ = 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDGCOL (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of GIVCOL, must be at least N.
</span><span class="comment">*</span><span class="comment">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?