dgesvd.f.html
来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 674 行 · 第 1/5 页
HTML
674 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>dgesvd.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="DGESVD.1"></a><a href="dgesvd.f.html#DGESVD.1">DGESVD</a>( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
$ WORK, LWORK, INFO )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> -- LAPACK driver 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> CHARACTER JOBU, JOBVT
INTEGER INFO, LDA, LDU, LDVT, LWORK, M, N
<span class="comment">*</span><span class="comment"> ..
</span><span class="comment">*</span><span class="comment"> .. Array Arguments ..
</span> DOUBLE PRECISION A( LDA, * ), S( * ), 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"> <a name="DGESVD.20"></a><a href="dgesvd.f.html#DGESVD.1">DGESVD</a> computes the singular value decomposition (SVD) of a real
</span><span class="comment">*</span><span class="comment"> M-by-N matrix A, optionally computing the left and/or right singular
</span><span class="comment">*</span><span class="comment"> vectors. The SVD is written
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A = U * SIGMA * transpose(V)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> where SIGMA is an M-by-N matrix which is zero except for its
</span><span class="comment">*</span><span class="comment"> min(m,n) diagonal elements, U is an M-by-M orthogonal matrix, and
</span><span class="comment">*</span><span class="comment"> V is an N-by-N orthogonal matrix. The diagonal elements of SIGMA
</span><span class="comment">*</span><span class="comment"> are the singular values of A; they are real and non-negative, and
</span><span class="comment">*</span><span class="comment"> are returned in descending order. The first min(m,n) columns of
</span><span class="comment">*</span><span class="comment"> U and V are the left and right singular vectors of A.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> Note that the routine returns V**T, not V.
</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"> JOBU (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> Specifies options for computing all or part of the matrix U:
</span><span class="comment">*</span><span class="comment"> = 'A': all M columns of U are returned in array U:
</span><span class="comment">*</span><span class="comment"> = 'S': the first min(m,n) columns of U (the left singular
</span><span class="comment">*</span><span class="comment"> vectors) are returned in the array U;
</span><span class="comment">*</span><span class="comment"> = 'O': the first min(m,n) columns of U (the left singular
</span><span class="comment">*</span><span class="comment"> vectors) are overwritten on the array A;
</span><span class="comment">*</span><span class="comment"> = 'N': no columns of U (no left singular vectors) are
</span><span class="comment">*</span><span class="comment"> computed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> JOBVT (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment"> Specifies options for computing all or part of the matrix
</span><span class="comment">*</span><span class="comment"> V**T:
</span><span class="comment">*</span><span class="comment"> = 'A': all N rows of V**T are returned in the array VT;
</span><span class="comment">*</span><span class="comment"> = 'S': the first min(m,n) rows of V**T (the right singular
</span><span class="comment">*</span><span class="comment"> vectors) are returned in the array VT;
</span><span class="comment">*</span><span class="comment"> = 'O': the first min(m,n) rows of V**T (the right singular
</span><span class="comment">*</span><span class="comment"> vectors) are overwritten on the array A;
</span><span class="comment">*</span><span class="comment"> = 'N': no rows of V**T (no right singular vectors) are
</span><span class="comment">*</span><span class="comment"> computed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> JOBVT and JOBU cannot both be 'O'.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> M (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The number of rows of the input matrix A. M >= 0.
</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 number of columns of the input matrix A. N >= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
</span><span class="comment">*</span><span class="comment"> On entry, the M-by-N matrix A.
</span><span class="comment">*</span><span class="comment"> On exit,
</span><span class="comment">*</span><span class="comment"> if JOBU = 'O', A is overwritten with the first min(m,n)
</span><span class="comment">*</span><span class="comment"> columns of U (the left singular vectors,
</span><span class="comment">*</span><span class="comment"> stored columnwise);
</span><span class="comment">*</span><span class="comment"> if JOBVT = 'O', A is overwritten with the first min(m,n)
</span><span class="comment">*</span><span class="comment"> rows of V**T (the right singular vectors,
</span><span class="comment">*</span><span class="comment"> stored rowwise);
</span><span class="comment">*</span><span class="comment"> if JOBU .ne. 'O' and JOBVT .ne. 'O', the contents of A
</span><span class="comment">*</span><span class="comment"> are destroyed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LDA (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The leading dimension of the array A. LDA >= max(1,M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> S (output) DOUBLE PRECISION array, dimension (min(M,N))
</span><span class="comment">*</span><span class="comment"> The singular values of A, sorted so that S(i) >= S(i+1).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> U (output) DOUBLE PRECISION array, dimension (LDU,UCOL)
</span><span class="comment">*</span><span class="comment"> (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.
</span><span class="comment">*</span><span class="comment"> If JOBU = 'A', U contains the M-by-M orthogonal matrix U;
</span><span class="comment">*</span><span class="comment"> if JOBU = 'S', U contains the first min(m,n) columns of U
</span><span class="comment">*</span><span class="comment"> (the left singular vectors, stored columnwise);
</span><span class="comment">*</span><span class="comment"> if JOBU = 'N' or 'O', U is not referenced.
</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"> The leading dimension of the array U. LDU >= 1; if
</span><span class="comment">*</span><span class="comment"> JOBU = 'S' or 'A', LDU >= M.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> VT (output) DOUBLE PRECISION array, dimension (LDVT,N)
</span><span class="comment">*</span><span class="comment"> If JOBVT = 'A', VT contains the N-by-N orthogonal matrix
</span><span class="comment">*</span><span class="comment"> V**T;
</span><span class="comment">*</span><span class="comment"> if JOBVT = 'S', VT contains the first min(m,n) rows of
</span><span class="comment">*</span><span class="comment"> V**T (the right singular vectors, stored rowwise);
</span><span class="comment">*</span><span class="comment"> if JOBVT = 'N' or 'O', VT is not referenced.
</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"> The leading dimension of the array VT. LDVT >= 1; if
</span><span class="comment">*</span><span class="comment"> JOBVT = 'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> WORK (workspace/output) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
</span><span class="comment">*</span><span class="comment"> On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
</span><span class="comment">*</span><span class="comment"> if INFO > 0, WORK(2:MIN(M,N)) contains the unconverged
</span><span class="comment">*</span><span class="comment"> superdiagonal elements of an upper bidiagonal matrix B
</span><span class="comment">*</span><span class="comment"> whose diagonal is in S (not necessarily sorted). B
</span><span class="comment">*</span><span class="comment"> satisfies A = U * B * VT, so it has the same singular values
</span><span class="comment">*</span><span class="comment"> as A, and singular vectors related by U and VT.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment"> LWORK (input) INTEGER
</span><span class="comment">*</span><span class="comment"> The dimension of the array WORK.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?