zlals0.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 458 行 · 第 1/3 页
HTML
458 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>zlals0.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="ZLALS0.1"></a><a href="zlals0.f.html#ZLALS0.1">ZLALS0</a>( ICOMPQ, NL, NR, SQRE, NRHS, B, LDB, BX, LDBX,
$ PERM, GIVPTR, GIVCOL, LDGCOL, GIVNUM, LDGNUM,
$ POLES, DIFL, DIFR, Z, K, C, S, RWORK, 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 GIVPTR, ICOMPQ, INFO, K, LDB, LDBX, LDGCOL,
$ LDGNUM, NL, NR, NRHS, SQRE
DOUBLE PRECISION C, S
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> INTEGER GIVCOL( LDGCOL, * ), PERM( * )
DOUBLE PRECISION DIFL( * ), DIFR( LDGNUM, * ),
$ GIVNUM( LDGNUM, * ), POLES( LDGNUM, * ),
$ RWORK( * ), Z( * )
COMPLEX*16 B( LDB, * ), BX( LDBX, * )
<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="ZLALS0.25"></a><a href="zlals0.f.html#ZLALS0.1">ZLALS0</a> applies back the multiplying factors of either the left or the
</span><span class="comment">*</span><span class="comment"> right singular vector matrix of a diagonal matrix appended by a row
</span><span class="comment">*</span><span class="comment"> to the right hand side matrix B in solving the least squares problem
</span><span class="comment">*</span><span class="comment"> using the divide-and-conquer SVD approach.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> For the left singular vector matrix, three types of orthogonal
</span><span class="comment">*</span><span class="comment"> matrices are involved:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> (1L) Givens rotations: the number of such rotations is GIVPTR; the
</span><span class="comment">*</span><span class="comment"> pairs of columns/rows they were applied to are stored in GIVCOL;
</span><span class="comment">*</span><span class="comment"> and the C- and S-values of these rotations are stored in GIVNUM.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> (2L) Permutation. The (NL+1)-st row of B is to be moved to the first
</span><span class="comment">*</span><span class="comment"> row, and for J=2:N, PERM(J)-th row of B is to be moved to the
</span><span class="comment">*</span><span class="comment"> J-th row.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> (3L) The left singular vector matrix of the remaining matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> For the right singular vector matrix, four types of orthogonal
</span><span class="comment">*</span><span class="comment"> matrices are involved:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> (1R) The right singular vector matrix of the remaining matrix.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> (2R) If SQRE = 1, one extra Givens rotation to generate the right
</span><span class="comment">*</span><span class="comment"> null space.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> (3R) The inverse transformation of (2L).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> (4R) The inverse transformation of (1L).
</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:
</span><span class="comment">*</span><span class="comment"> = 0: Left singular vector matrix.
</span><span class="comment">*</span><span class="comment"> = 1: Right singular vector matrix.
</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 row dimension N = NL + NR + 1,
</span><span class="comment">*</span><span class="comment"> and column dimension M = N + SQRE.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> NRHS (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of columns of B and BX. NRHS must be at least 1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> B (input/output) COMPLEX*16 array, dimension ( LDB, NRHS )
</span><span class="comment">*</span><span class="comment"> On input, B contains the right hand sides of the least
</span><span class="comment">*</span><span class="comment"> squares problem in rows 1 through M. On output, B contains
</span><span class="comment">*</span><span class="comment"> the solution X in rows 1 through N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDB (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of B. LDB must be at least
</span><span class="comment">*</span><span class="comment"> max(1,MAX( M, N ) ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> BX (workspace) COMPLEX*16 array, dimension ( LDBX, NRHS )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDBX (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of BX.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> PERM (input) INTEGER array, dimension ( N )
</span><span class="comment">*</span><span class="comment"> The permutations (from deflation and sorting) applied
</span><span class="comment">*</span><span class="comment"> to the two blocks.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> GIVPTR (input) 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.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 )
</span><span class="comment">*</span><span class="comment"> Each pair of numbers indicates a pair of rows/columns
</span><span class="comment">*</span><span class="comment"> involved in a Givens rotation.
</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">
</span><span class="comment">*</span><span class="comment"> GIVNUM (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
</span><span class="comment">*</span><span class="comment"> Each number indicates the C or S value used in the
</span><span class="comment">*</span><span class="comment"> corresponding Givens rotation.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDGNUM (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of arrays DIFR, POLES and
</span><span class="comment">*</span><span class="comment"> GIVNUM, must be at least K.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> POLES (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 )
</span><span class="comment">*</span><span class="comment"> On entry, POLES(1:K, 1) contains the new singular
</span><span class="comment">*</span><span class="comment"> values obtained from solving the secular equation, and
</span><span class="comment">*</span><span class="comment"> POLES(1:K, 2) is an array containing the poles 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"> DIFL (input) DOUBLE PRECISION array, dimension ( K ).
</span><span class="comment">*</span><span class="comment"> On entry, DIFL(I) is the distance between I-th updated
</span><span class="comment">*</span><span class="comment"> (undeflated) singular value and the I-th (undeflated) old
</span><span class="comment">*</span><span class="comment"> singular value.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> DIFR (input) DOUBLE PRECISION array, dimension ( LDGNUM, 2 ).
</span><span class="comment">*</span><span class="comment"> On entry, DIFR(I, 1) contains the distances between I-th
</span><span class="comment">*</span><span class="comment"> updated (undeflated) singular value and the I+1-th
</span><span class="comment">*</span><span class="comment"> (undeflated) old singular value. And DIFR(I, 2) is the
</span><span class="comment">*</span><span class="comment"> normalizing factor for the I-th right singular vector.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Z (input) DOUBLE PRECISION array, dimension ( K )
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?