ctgsja.f.html

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

HTML
550
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>ctgsja.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="CTGSJA.1"></a><a href="ctgsja.f.html#CTGSJA.1">CTGSJA</a>( JOBU, JOBV, JOBQ, M, P, N, K, L, A, LDA, B,
     $                   LDB, TOLA, TOLB, ALPHA, BETA, U, LDU, V, LDV,
     $                   Q, LDQ, WORK, NCYCLE, 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>      CHARACTER          JOBQ, JOBU, JOBV
      INTEGER            INFO, K, L, LDA, LDB, LDQ, LDU, LDV, M, N,
     $                   NCYCLE, P
      REAL               TOLA, TOLB
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      REAL               ALPHA( * ), BETA( * )
      COMPLEX            A( LDA, * ), B( LDB, * ), Q( LDQ, * ),
     $                   U( LDU, * ), V( LDV, * ), 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="CTGSJA.24"></a><a href="ctgsja.f.html#CTGSJA.1">CTGSJA</a> computes the generalized singular value decomposition (GSVD)
</span><span class="comment">*</span><span class="comment">  of two complex upper triangular (or trapezoidal) matrices A and B.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  On entry, it is assumed that matrices A and B have the following
</span><span class="comment">*</span><span class="comment">  forms, which may be obtained by the preprocessing subroutine <a name="CGGSVP.28"></a><a href="cggsvp.f.html#CGGSVP.1">CGGSVP</a>
</span><span class="comment">*</span><span class="comment">  from a general M-by-N matrix A and P-by-N matrix B:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">               N-K-L  K    L
</span><span class="comment">*</span><span class="comment">     A =    K ( 0    A12  A13 ) if M-K-L &gt;= 0;
</span><span class="comment">*</span><span class="comment">            L ( 0     0   A23 )
</span><span class="comment">*</span><span class="comment">        M-K-L ( 0     0    0  )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">             N-K-L  K    L
</span><span class="comment">*</span><span class="comment">     A =  K ( 0    A12  A13 ) if M-K-L &lt; 0;
</span><span class="comment">*</span><span class="comment">        M-K ( 0     0   A23 )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">             N-K-L  K    L
</span><span class="comment">*</span><span class="comment">     B =  L ( 0     0   B13 )
</span><span class="comment">*</span><span class="comment">        P-L ( 0     0    0  )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  where the K-by-K matrix A12 and L-by-L matrix B13 are nonsingular
</span><span class="comment">*</span><span class="comment">  upper triangular; A23 is L-by-L upper triangular if M-K-L &gt;= 0,
</span><span class="comment">*</span><span class="comment">  otherwise A23 is (M-K)-by-L upper trapezoidal.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  On exit,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">         U'*A*Q = D1*( 0 R ),    V'*B*Q = D2*( 0 R ),
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  where U, V and Q are unitary matrices, Z' denotes the conjugate
</span><span class="comment">*</span><span class="comment">  transpose of Z, R is a nonsingular upper triangular matrix, and D1
</span><span class="comment">*</span><span class="comment">  and D2 are ``diagonal'' matrices, which are of the following
</span><span class="comment">*</span><span class="comment">  structures:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  If M-K-L &gt;= 0,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">                      K  L
</span><span class="comment">*</span><span class="comment">         D1 =     K ( I  0 )
</span><span class="comment">*</span><span class="comment">                  L ( 0  C )
</span><span class="comment">*</span><span class="comment">              M-K-L ( 0  0 )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">                     K  L
</span><span class="comment">*</span><span class="comment">         D2 = L   ( 0  S )
</span><span class="comment">*</span><span class="comment">              P-L ( 0  0 )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">                 N-K-L  K    L
</span><span class="comment">*</span><span class="comment">    ( 0 R ) = K (  0   R11  R12 ) K
</span><span class="comment">*</span><span class="comment">              L (  0    0   R22 ) L
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  where
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">    C = diag( ALPHA(K+1), ... , ALPHA(K+L) ),
</span><span class="comment">*</span><span class="comment">    S = diag( BETA(K+1),  ... , BETA(K+L) ),
</span><span class="comment">*</span><span class="comment">    C**2 + S**2 = I.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">    R is stored in A(1:K+L,N-K-L+1:N) on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  If M-K-L &lt; 0,
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">                 K M-K K+L-M
</span><span class="comment">*</span><span class="comment">      D1 =   K ( I  0    0   )
</span><span class="comment">*</span><span class="comment">           M-K ( 0  C    0   )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">                   K M-K K+L-M
</span><span class="comment">*</span><span class="comment">      D2 =   M-K ( 0  S    0   )
</span><span class="comment">*</span><span class="comment">           K+L-M ( 0  0    I   )
</span><span class="comment">*</span><span class="comment">             P-L ( 0  0    0   )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">                 N-K-L  K   M-K  K+L-M
</span><span class="comment">*</span><span class="comment"> ( 0 R ) =    K ( 0    R11  R12  R13  )
</span><span class="comment">*</span><span class="comment">            M-K ( 0     0   R22  R23  )
</span><span class="comment">*</span><span class="comment">          K+L-M ( 0     0    0   R33  )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  where
</span><span class="comment">*</span><span class="comment">  C = diag( ALPHA(K+1), ... , ALPHA(M) ),
</span><span class="comment">*</span><span class="comment">  S = diag( BETA(K+1),  ... , BETA(M) ),
</span><span class="comment">*</span><span class="comment">  C**2 + S**2 = I.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  R = ( R11 R12 R13 ) is stored in A(1:M, N-K-L+1:N) and R33 is stored
</span><span class="comment">*</span><span class="comment">      (  0  R22 R23 )
</span><span class="comment">*</span><span class="comment">  in B(M-K+1:L,N+M-K-L+1:N) on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The computation of the unitary transformation matrices U, V or Q
</span><span class="comment">*</span><span class="comment">  is optional.  These matrices may either be formed explicitly, or they
</span><span class="comment">*</span><span class="comment">  may be postmultiplied into input matrices U1, V1, or Q1.
</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">          = 'U':  U must contain a unitary matrix U1 on entry, and
</span><span class="comment">*</span><span class="comment">                  the product U1*U is returned;
</span><span class="comment">*</span><span class="comment">          = 'I':  U is initialized to the unit matrix, and the
</span><span class="comment">*</span><span class="comment">                  unitary matrix U is returned;
</span><span class="comment">*</span><span class="comment">          = 'N':  U is not computed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  JOBV    (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'V':  V must contain a unitary matrix V1 on entry, and
</span><span class="comment">*</span><span class="comment">                  the product V1*V is returned;
</span><span class="comment">*</span><span class="comment">          = 'I':  V is initialized to the unit matrix, and the
</span><span class="comment">*</span><span class="comment">                  unitary matrix V is returned;
</span><span class="comment">*</span><span class="comment">          = 'N':  V is not computed.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  JOBQ    (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'Q':  Q must contain a unitary matrix Q1 on entry, and
</span><span class="comment">*</span><span class="comment">                  the product Q1*Q is returned;
</span><span class="comment">*</span><span class="comment">          = 'I':  Q is initialized to the unit matrix, and the
</span><span class="comment">*</span><span class="comment">                  unitary matrix Q is returned;
</span><span class="comment">*</span><span class="comment">          = 'N':  Q is not 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 matrix A.  M &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  P       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of rows of the matrix B.  P &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 matrices A and B.  N &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  K       (input) INTEGER
</span><span class="comment">*</span><span class="comment">  L       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          K and L specify the subblocks in the input matrices A and B:
</span><span class="comment">*</span><span class="comment">          A23 = A(K+1:MIN(K+L,M),N-L+1:N) and B13 = B(1:L,,N-L+1:N)
</span><span class="comment">*</span><span class="comment">          of A and B, whose GSVD is going to be computed by <a name="CTGSJA.146"></a><a href="ctgsja.f.html#CTGSJA.1">CTGSJA</a>.
</span><span class="comment">*</span><span class="comment">          See Further details.
</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, A(N-K+1:N,1:MIN(K+L,M) ) contains the triangular
</span><span class="comment">*</span><span class="comment">          matrix R or part of R.  See Purpose for details.
</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">  B       (input/output) COMPLEX array, dimension (LDB,N)
</span><span class="comment">*</span><span class="comment">          On entry, the P-by-N matrix B.
</span><span class="comment">*</span><span class="comment">          On exit, if necessary, B(M-K+1:L,N+M-K-L+1:N) contains
</span><span class="comment">*</span><span class="comment">          a part of R.  See Purpose for details.
</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 the array B. LDB &gt;= max(1,P).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  TOLA    (input) REAL

⌨️ 快捷键说明

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