clalsa.f.html

来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 528 行 · 第 1/3 页

HTML
528
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>clalsa.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="CLALSA.1"></a><a href="clalsa.f.html#CLALSA.1">CLALSA</a>( ICOMPQ, SMLSIZ, N, NRHS, B, LDB, BX, LDBX, U,
     $                   LDU, VT, K, DIFL, DIFR, Z, POLES, GIVPTR,
     $                   GIVCOL, LDGCOL, PERM, GIVNUM, C, S, RWORK,
     $                   IWORK, 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            ICOMPQ, INFO, LDB, LDBX, LDGCOL, LDU, N, NRHS,
     $                   SMLSIZ
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      INTEGER            GIVCOL( LDGCOL, * ), GIVPTR( * ), IWORK( * ),
     $                   K( * ), PERM( LDGCOL, * )
      REAL               C( * ), DIFL( LDU, * ), DIFR( LDU, * ),
     $                   GIVNUM( LDU, * ), POLES( LDU, * ), RWORK( * ),
     $                   S( * ), U( LDU, * ), VT( LDU, * ), Z( LDU, * )
      COMPLEX            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="CLALSA.26"></a><a href="clalsa.f.html#CLALSA.1">CLALSA</a> is an itermediate step in solving the least squares problem
</span><span class="comment">*</span><span class="comment">  by computing the SVD of the coefficient matrix in compact form (The
</span><span class="comment">*</span><span class="comment">  singular vectors are computed as products of simple orthorgonal
</span><span class="comment">*</span><span class="comment">  matrices.).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  If ICOMPQ = 0, <a name="CLALSA.31"></a><a href="clalsa.f.html#CLALSA.1">CLALSA</a> applies the inverse of the left singular vector
</span><span class="comment">*</span><span class="comment">  matrix of an upper bidiagonal matrix to the right hand side; and if
</span><span class="comment">*</span><span class="comment">  ICOMPQ = 1, <a name="CLALSA.33"></a><a href="clalsa.f.html#CLALSA.1">CLALSA</a> applies the right singular vector matrix to the
</span><span class="comment">*</span><span class="comment">  right hand side. The singular vector matrices were generated in
</span><span class="comment">*</span><span class="comment">  compact form by <a name="CLALSA.35"></a><a href="clalsa.f.html#CLALSA.1">CLALSA</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 the left or the right singular vector
</span><span class="comment">*</span><span class="comment">         matrix is involved.
</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">  SMLSIZ (input) INTEGER
</span><span class="comment">*</span><span class="comment">         The maximum size of the subproblems at the bottom of the
</span><span class="comment">*</span><span class="comment">         computation tree.
</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 row and column dimensions of the upper bidiagonal matrix.
</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 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.
</span><span class="comment">*</span><span class="comment">         On output, B contains 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 in the calling subprogram.
</span><span class="comment">*</span><span class="comment">         LDB must be at least max(1,MAX( M, N ) ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  BX     (output) COMPLEX array, dimension ( LDBX, NRHS )
</span><span class="comment">*</span><span class="comment">         On exit, the result of applying the left or right singular
</span><span class="comment">*</span><span class="comment">         vector matrix to B.
</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">  U      (input) REAL array, dimension ( LDU, SMLSIZ ).
</span><span class="comment">*</span><span class="comment">         On entry, U contains the left singular vector matrices of all
</span><span class="comment">*</span><span class="comment">         subproblems at the bottom level.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDU    (input) INTEGER, LDU = &gt; N.
</span><span class="comment">*</span><span class="comment">         The leading dimension of arrays U, VT, DIFL, DIFR,
</span><span class="comment">*</span><span class="comment">         POLES, GIVNUM, and Z.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  VT     (input) REAL array, dimension ( LDU, SMLSIZ+1 ).
</span><span class="comment">*</span><span class="comment">         On entry, VT' contains the right singular vector matrices of
</span><span class="comment">*</span><span class="comment">         all subproblems at the bottom level.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  K      (input) INTEGER array, dimension ( N ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  DIFL   (input) REAL array, dimension ( LDU, NLVL ).
</span><span class="comment">*</span><span class="comment">         where NLVL = INT(log_2 (N/(SMLSIZ+1))) + 1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  DIFR   (input) REAL array, dimension ( LDU, 2 * NLVL ).
</span><span class="comment">*</span><span class="comment">         On entry, DIFL(*, I) and DIFR(*, 2 * I -1) record
</span><span class="comment">*</span><span class="comment">         distances between singular values on the I-th level and
</span><span class="comment">*</span><span class="comment">         singular values on the (I -1)-th level, and DIFR(*, 2 * I)
</span><span class="comment">*</span><span class="comment">         record the normalizing factors of the right singular vectors
</span><span class="comment">*</span><span class="comment">         matrices of subproblems on I-th level.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Z      (input) REAL array, dimension ( LDU, NLVL ).
</span><span class="comment">*</span><span class="comment">         On entry, Z(1, I) contains the components of the deflation-
</span><span class="comment">*</span><span class="comment">         adjusted updating row vector for subproblems on the I-th
</span><span class="comment">*</span><span class="comment">         level.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  POLES  (input) REAL array, dimension ( LDU, 2 * NLVL ).
</span><span class="comment">*</span><span class="comment">         On entry, POLES(*, 2 * I -1: 2 * I) contains the new and old
</span><span class="comment">*</span><span class="comment">         singular values involved in the secular equations on the I-th
</span><span class="comment">*</span><span class="comment">         level.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  GIVPTR (input) INTEGER array, dimension ( N ).
</span><span class="comment">*</span><span class="comment">         On entry, GIVPTR( I ) records the number of Givens
</span><span class="comment">*</span><span class="comment">         rotations performed on the I-th problem on the computation
</span><span class="comment">*</span><span class="comment">         tree.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  GIVCOL (input) INTEGER array, dimension ( LDGCOL, 2 * NLVL ).
</span><span class="comment">*</span><span class="comment">         On entry, for each I, GIVCOL(*, 2 * I - 1: 2 * I) records the
</span><span class="comment">*</span><span class="comment">         locations of Givens rotations performed on the I-th level on
</span><span class="comment">*</span><span class="comment">         the computation tree.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDGCOL (input) INTEGER, LDGCOL = &gt; N.
</span><span class="comment">*</span><span class="comment">         The leading dimension of arrays GIVCOL and PERM.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  PERM   (input) INTEGER array, dimension ( LDGCOL, NLVL ).
</span><span class="comment">*</span><span class="comment">         On entry, PERM(*, I) records permutations done on the I-th
</span><span class="comment">*</span><span class="comment">         level of the computation tree.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  GIVNUM (input) REAL array, dimension ( LDU, 2 * NLVL ).
</span><span class="comment">*</span><span class="comment">         On entry, GIVNUM(*, 2 *I -1 : 2 * I) records the C- and S-
</span><span class="comment">*</span><span class="comment">         values of Givens rotations performed on the I-th level on the
</span><span class="comment">*</span><span class="comment">         computation tree.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  C      (input) REAL array, dimension ( N ).
</span><span class="comment">*</span><span class="comment">         On entry, if the I-th subproblem is not square,
</span><span class="comment">*</span><span class="comment">         C( I ) contains the C-value of a Givens rotation related to
</span><span class="comment">*</span><span class="comment">         the right null space of the I-th subproblem.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  S      (input) REAL array, dimension ( N ).
</span><span class="comment">*</span><span class="comment">         On entry, if the I-th subproblem is not square,
</span><span class="comment">*</span><span class="comment">         S( I ) contains the S-value of a Givens rotation related to
</span><span class="comment">*</span><span class="comment">         the right null space of the I-th subproblem.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  RWORK  (workspace) REAL array, dimension at least
</span><span class="comment">*</span><span class="comment">         max ( N, (SMLSZ+1)*NRHS*3 ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  IWORK  (workspace) INTEGER array.
</span><span class="comment">*</span><span class="comment">         The dimension must be at least 3 * N
</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">          &lt; 0:  if INFO = -i, the i-th argument had an illegal value.
</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 Ren-Cang Li, 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">     Osni Marques, LBNL/NERSC, 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">

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?