cgesvd.f.html

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

HTML
669
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>cgesvd.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="CGESVD.1"></a><a href="cgesvd.f.html#CGESVD.1">CGESVD</a>( JOBU, JOBVT, M, N, A, LDA, S, U, LDU, VT, LDVT,
     $                   WORK, LWORK, RWORK, 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>      REAL               RWORK( * ), S( * )
      COMPLEX            A( LDA, * ), 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="CGESVD.21"></a><a href="cgesvd.f.html#CGESVD.1">CGESVD</a> computes the singular value decomposition (SVD) of a complex
</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 * conjugate-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 unitary matrix, and
</span><span class="comment">*</span><span class="comment">  V is an N-by-N unitary 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**H, 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**H:
</span><span class="comment">*</span><span class="comment">          = 'A':  all N rows of V**H are returned in the array VT;
</span><span class="comment">*</span><span class="comment">          = 'S':  the first min(m,n) rows of V**H (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**H (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**H (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 &gt;= 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 &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  A       (input/output) COMPLEX 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**H (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 &gt;= max(1,M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  S       (output) REAL array, dimension (min(M,N))
</span><span class="comment">*</span><span class="comment">          The singular values of A, sorted so that S(i) &gt;= S(i+1).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  U       (output) COMPLEX 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 unitary 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 &gt;= 1; if
</span><span class="comment">*</span><span class="comment">          JOBU = 'S' or 'A', LDU &gt;= M.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  VT      (output) COMPLEX array, dimension (LDVT,N)
</span><span class="comment">*</span><span class="comment">          If JOBVT = 'A', VT contains the N-by-N unitary matrix
</span><span class="comment">*</span><span class="comment">          V**H;
</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**H (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 &gt;= 1; if
</span><span class="comment">*</span><span class="comment">          JOBVT = 'A', LDVT &gt;= N; if JOBVT = 'S', LDVT &gt;= min(M,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  WORK    (workspace/output) COMPLEX 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">
</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.
</span><span class="comment">*</span><span class="comment">          LWORK &gt;=  MAX(1,2*MIN(M,N)+MAX(M,N)).
</span><span class="comment">*</span><span class="comment">          For good performance, LWORK should generally be larger.
</span><span class="comment">*</span><span class="comment">

⌨️ 快捷键说明

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