cgesdd.f.html

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

HTML
713
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>cgesdd.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="CGESDD.1"></a><a href="cgesdd.f.html#CGESDD.1">CGESDD</a>( JOBZ, M, N, A, LDA, S, U, LDU, VT, LDVT,
     $                   WORK, LWORK, RWORK, IWORK, 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">     8-15-00:  Improve consistency of WS calculations (eca)
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     .. Scalar Arguments ..
</span>      CHARACTER          JOBZ
      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>      INTEGER            IWORK( * )
      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="CGESDD.23"></a><a href="cgesdd.f.html#CGESDD.1">CGESDD</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, by using divide-and-conquer method. 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 VT = V**H, not V.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The divide and conquer algorithm makes very mild assumptions about
</span><span class="comment">*</span><span class="comment">  floating point arithmetic. It will work on machines with a guard
</span><span class="comment">*</span><span class="comment">  digit in add/subtract, or on those binary machines without guard
</span><span class="comment">*</span><span class="comment">  digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or
</span><span class="comment">*</span><span class="comment">  Cray-2. It could conceivably fail on hexadecimal or decimal machines
</span><span class="comment">*</span><span class="comment">  without guard digits, but we know of none.
</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">  JOBZ    (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 and all N rows of V**H are
</span><span class="comment">*</span><span class="comment">                  returned in the arrays U and VT;
</span><span class="comment">*</span><span class="comment">          = 'S':  the first min(M,N) columns of U and the first
</span><span class="comment">*</span><span class="comment">                  min(M,N) rows of V**H are returned in the arrays U
</span><span class="comment">*</span><span class="comment">                  and VT;
</span><span class="comment">*</span><span class="comment">          = 'O':  If M &gt;= N, the first N columns of U are overwritten
</span><span class="comment">*</span><span class="comment">                  in the array A and all rows of V**H are returned in
</span><span class="comment">*</span><span class="comment">                  the array VT;
</span><span class="comment">*</span><span class="comment">                  otherwise, all columns of U are returned in the
</span><span class="comment">*</span><span class="comment">                  array U and the first M rows of V**H are overwritten
</span><span class="comment">*</span><span class="comment">                  in the array A;
</span><span class="comment">*</span><span class="comment">          = 'N':  no columns of U or rows of V**H are computed.
</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 JOBZ = 'O',  A is overwritten with the first N columns
</span><span class="comment">*</span><span class="comment">                          of U (the left singular vectors, stored
</span><span class="comment">*</span><span class="comment">                          columnwise) if M &gt;= N;
</span><span class="comment">*</span><span class="comment">                          A is overwritten with the first M rows
</span><span class="comment">*</span><span class="comment">                          of V**H (the right singular vectors, stored
</span><span class="comment">*</span><span class="comment">                          rowwise) otherwise.
</span><span class="comment">*</span><span class="comment">          if JOBZ .ne. 'O', the contents of A 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">          UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M &lt; N;
</span><span class="comment">*</span><span class="comment">          UCOL = min(M,N) if JOBZ = 'S'.
</span><span class="comment">*</span><span class="comment">          If JOBZ = 'A' or JOBZ = 'O' and M &lt; N, U contains the M-by-M
</span><span class="comment">*</span><span class="comment">          unitary matrix U;
</span><span class="comment">*</span><span class="comment">          if JOBZ = '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 JOBZ = 'O' and M &gt;= N, or JOBZ = 'N', 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">          JOBZ = 'S' or 'A' or JOBZ = 'O' and M &lt; N, 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 JOBZ = 'A' or JOBZ = 'O' and M &gt;= N, VT contains the
</span><span class="comment">*</span><span class="comment">          N-by-N unitary matrix V**H;
</span><span class="comment">*</span><span class="comment">          if JOBZ = '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 JOBZ = 'O' and M &lt; N, or JOBZ = 'N', 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">          JOBZ = 'A' or JOBZ = 'O' and M &gt;= N, LDVT &gt;= N;
</span><span class="comment">*</span><span class="comment">          if JOBZ = '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. LWORK &gt;= 1.
</span><span class="comment">*</span><span class="comment">          if JOBZ = 'N', LWORK &gt;= 2*min(M,N)+max(M,N).
</span><span class="comment">*</span><span class="comment">          if JOBZ = 'O',
</span><span class="comment">*</span><span class="comment">                LWORK &gt;= 2*min(M,N)*min(M,N)+2*min(M,N)+max(M,N).
</span><span class="comment">*</span><span class="comment">          if JOBZ = 'S' or 'A',
</span><span class="comment">*</span><span class="comment">                LWORK &gt;= min(M,N)*min(M,N)+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">
</span><span class="comment">*</span><span class="comment">          If LWORK = -1, a workspace query is assumed.  The optimal
</span><span class="comment">*</span><span class="comment">          size for the WORK array is calculated and stored in WORK(1),

⌨️ 快捷键说明

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