dlasd0.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 255 行 · 第 1/2 页
HTML
255 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dlasd0.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="DLASD0.1"></a><a href="dlasd0.f.html#DLASD0.1">DLASD0</a>( N, SQRE, D, E, U, LDU, VT, LDVT, SMLSIZ, IWORK,
$ 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 INFO, LDU, LDVT, N, SMLSIZ, SQRE
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> INTEGER IWORK( * )
DOUBLE PRECISION D( * ), E( * ), U( LDU, * ), VT( LDVT, * ),
$ WORK( * )
<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"> Using a divide and conquer approach, <a name="DLASD0.20"></a><a href="dlasd0.f.html#DLASD0.1">DLASD0</a> computes the singular
</span><span class="comment">*</span><span class="comment"> value decomposition (SVD) of a real upper bidiagonal N-by-M
</span><span class="comment">*</span><span class="comment"> matrix B with diagonal D and offdiagonal E, where M = N + SQRE.
</span><span class="comment">*</span><span class="comment"> The algorithm computes orthogonal matrices U and VT such that
</span><span class="comment">*</span><span class="comment"> B = U * S * VT. The singular values S are overwritten on D.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A related subroutine, <a name="DLASDA.26"></a><a href="dlasda.f.html#DLASDA.1">DLASDA</a>, computes only the singular values,
</span><span class="comment">*</span><span class="comment"> and optionally, the singular vectors in compact form.
</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"> N (input) INTEGER
</span><span class="comment">*</span><span class="comment"> On entry, the row dimension of the upper bidiagonal matrix.
</span><span class="comment">*</span><span class="comment"> This is also the dimension of the main diagonal array D.
</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"> Specifies the column dimension of the bidiagonal matrix.
</span><span class="comment">*</span><span class="comment"> = 0: The bidiagonal matrix has column dimension M = N;
</span><span class="comment">*</span><span class="comment"> = 1: The bidiagonal matrix has column dimension M = N+1;
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> D (input/output) DOUBLE PRECISION array, dimension (N)
</span><span class="comment">*</span><span class="comment"> On entry D contains the main diagonal of the bidiagonal
</span><span class="comment">*</span><span class="comment"> matrix.
</span><span class="comment">*</span><span class="comment"> On exit D, if INFO = 0, contains its singular values.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> E (input) DOUBLE PRECISION array, dimension (M-1)
</span><span class="comment">*</span><span class="comment"> Contains the subdiagonal entries of the bidiagonal matrix.
</span><span class="comment">*</span><span class="comment"> On exit, E has been destroyed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> U (output) DOUBLE PRECISION array, dimension at least (LDQ, N)
</span><span class="comment">*</span><span class="comment"> On exit, U contains the left singular vectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDU (input) INTEGER
</span><span class="comment">*</span><span class="comment"> On entry, leading dimension of U.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VT (output) DOUBLE PRECISION array, dimension at least (LDVT, M)
</span><span class="comment">*</span><span class="comment"> On exit, VT' contains the right singular vectors.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDVT (input) INTEGER
</span><span class="comment">*</span><span class="comment"> On entry, leading dimension of VT.
</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"> On entry, maximum size of the subproblems at the
</span><span class="comment">*</span><span class="comment"> bottom of the computation tree.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> IWORK (workspace) INTEGER work array.
</span><span class="comment">*</span><span class="comment"> Dimension must be at least (8 * N)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace) DOUBLE PRECISION work array.
</span><span class="comment">*</span><span class="comment"> Dimension must be at least (3 * M**2 + 2 * M)
</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"> .. Local Scalars ..
</span> INTEGER I, I1, IC, IDXQ, IDXQC, IM1, INODE, ITEMP, IWK,
$ J, LF, LL, LVL, M, NCC, ND, NDB1, NDIML, NDIMR,
$ NL, NLF, NLP1, NLVL, NR, NRF, NRP1, SQREI
DOUBLE PRECISION ALPHA, BETA
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. External Subroutines ..
</span> EXTERNAL <a name="DLASD1.93"></a><a href="dlasd1.f.html#DLASD1.1">DLASD1</a>, <a name="DLASDQ.93"></a><a href="dlasdq.f.html#DLASDQ.1">DLASDQ</a>, <a name="DLASDT.93"></a><a href="dlasdt.f.html#DLASDT.1">DLASDT</a>, <a name="XERBLA.93"></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"> .. 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">
</span> IF( N.LT.0 ) THEN
INFO = -1
ELSE IF( ( SQRE.LT.0 ) .OR. ( SQRE.GT.1 ) ) THEN
INFO = -2
END IF
<span class="comment">*</span><span class="comment">
</span> M = N + SQRE
<span class="comment">*</span><span class="comment">
</span> IF( LDU.LT.N ) THEN
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?