sopmtr.f.html

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

HTML
282
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>sopmtr.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="SOPMTR.1"></a><a href="sopmtr.f.html#SOPMTR.1">SOPMTR</a>( SIDE, UPLO, TRANS, M, N, AP, TAU, C, LDC, WORK,
     $                   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          SIDE, TRANS, UPLO
      INTEGER            INFO, LDC, M, N
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      REAL               AP( * ), C( LDC, * ), TAU( * ), 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="SOPMTR.19"></a><a href="sopmtr.f.html#SOPMTR.1">SOPMTR</a> overwrites the general real M-by-N matrix C with
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">                  SIDE = 'L'     SIDE = 'R'
</span><span class="comment">*</span><span class="comment">  TRANS = 'N':      Q * C          C * Q
</span><span class="comment">*</span><span class="comment">  TRANS = 'T':      Q**T * C       C * Q**T
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  where Q is a real orthogonal matrix of order nq, with nq = m if
</span><span class="comment">*</span><span class="comment">  SIDE = 'L' and nq = n if SIDE = 'R'. Q is defined as the product of
</span><span class="comment">*</span><span class="comment">  nq-1 elementary reflectors, as returned by <a name="SSPTRD.27"></a><a href="ssptrd.f.html#SSPTRD.1">SSPTRD</a> using packed
</span><span class="comment">*</span><span class="comment">  storage:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  if UPLO = 'U', Q = H(nq-1) . . . H(2) H(1);
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  if UPLO = 'L', Q = H(1) H(2) . . . H(nq-1).
</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">  SIDE    (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'L': apply Q or Q**T from the Left;
</span><span class="comment">*</span><span class="comment">          = 'R': apply Q or Q**T from the Right.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  UPLO    (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'U': Upper triangular packed storage used in previous
</span><span class="comment">*</span><span class="comment">                 call to <a name="SSPTRD.43"></a><a href="ssptrd.f.html#SSPTRD.1">SSPTRD</a>;
</span><span class="comment">*</span><span class="comment">          = 'L': Lower triangular packed storage used in previous
</span><span class="comment">*</span><span class="comment">                 call to <a name="SSPTRD.45"></a><a href="ssptrd.f.html#SSPTRD.1">SSPTRD</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  TRANS   (input) CHARACTER*1
</span><span class="comment">*</span><span class="comment">          = 'N':  No transpose, apply Q;
</span><span class="comment">*</span><span class="comment">          = 'T':  Transpose, apply Q**T.
</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 C. 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 matrix C. N &gt;= 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  AP      (input) REAL array, dimension
</span><span class="comment">*</span><span class="comment">                               (M*(M+1)/2) if SIDE = 'L'
</span><span class="comment">*</span><span class="comment">                               (N*(N+1)/2) if SIDE = 'R'
</span><span class="comment">*</span><span class="comment">          The vectors which define the elementary reflectors, as
</span><span class="comment">*</span><span class="comment">          returned by <a name="SSPTRD.61"></a><a href="ssptrd.f.html#SSPTRD.1">SSPTRD</a>.  AP is modified by the routine but
</span><span class="comment">*</span><span class="comment">          restored on exit.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  TAU     (input) REAL array, dimension (M-1) if SIDE = 'L'
</span><span class="comment">*</span><span class="comment">                                     or (N-1) if SIDE = 'R'
</span><span class="comment">*</span><span class="comment">          TAU(i) must contain the scalar factor of the elementary
</span><span class="comment">*</span><span class="comment">          reflector H(i), as returned by <a name="SSPTRD.67"></a><a href="ssptrd.f.html#SSPTRD.1">SSPTRD</a>.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  C       (input/output) REAL array, dimension (LDC,N)
</span><span class="comment">*</span><span class="comment">          On entry, the M-by-N matrix C.
</span><span class="comment">*</span><span class="comment">          On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDC     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array C. LDC &gt;= max(1,M).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  WORK    (workspace) REAL array, dimension
</span><span class="comment">*</span><span class="comment">                                   (N) if SIDE = 'L'
</span><span class="comment">*</span><span class="comment">                                   (M) if SIDE = 'R'
</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">          &lt; 0:  if INFO = -i, the i-th argument had an illegal value
</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">     .. Parameters ..
</span>      REAL               ONE
      PARAMETER          ( ONE = 1.0E+0 )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      LOGICAL            FORWRD, LEFT, NOTRAN, UPPER
      INTEGER            I, I1, I2, I3, IC, II, JC, MI, NI, NQ
      REAL               AII
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      LOGICAL            <a name="LSAME.96"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
      EXTERNAL           <a name="LSAME.97"></a><a href="lsame.f.html#LSAME.1">LSAME</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Subroutines ..
</span>      EXTERNAL           <a name="SLARF.100"></a><a href="slarf.f.html#SLARF.1">SLARF</a>, <a name="XERBLA.100"></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">     .. Intrinsic Functions ..
</span>      INTRINSIC          MAX
<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 arguments
</span><span class="comment">*</span><span class="comment">
</span>      INFO = 0
      LEFT = <a name="LSAME.110"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( SIDE, <span class="string">'L'</span> )
      NOTRAN = <a name="LSAME.111"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( TRANS, <span class="string">'N'</span> )
      UPPER = <a name="LSAME.112"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( UPLO, <span class="string">'U'</span> )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     NQ is the order of Q
</span><span class="comment">*</span><span class="comment">
</span>      IF( LEFT ) THEN
         NQ = M
      ELSE
         NQ = N
      END IF
      IF( .NOT.LEFT .AND. .NOT.<a name="LSAME.121"></a><a href="lsame.f.html#LSAME.1">LSAME</a>( SIDE, <span class="string">'R'</span> ) ) THEN
         INFO = -1

⌨️ 快捷键说明

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