zlapll.f.html

来自「famous linear algebra library (LAPACK) p」· HTML 代码 · 共 126 行

HTML
126
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>zlapll.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.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="ZLAPLL.1"></a><a href="zlapll.f.html#ZLAPLL.1">ZLAPLL</a>( N, X, INCX, Y, INCY, SSMIN )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  -- LAPACK auxiliary 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>      INTEGER            INCX, INCY, N
      DOUBLE PRECISION   SSMIN
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      COMPLEX*16         X( * ), Y( * )
<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">  Given two column vectors X and Y, let
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">                       A = ( X Y ).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The subroutine first computes the QR factorization of A = Q*R,
</span><span class="comment">*</span><span class="comment">  and then computes the SVD of the 2-by-2 upper triangular matrix R.
</span><span class="comment">*</span><span class="comment">  The smaller singular value of R is returned in SSMIN, which is used
</span><span class="comment">*</span><span class="comment">  as the measurement of the linear dependency of the vectors X and Y.
</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">  N       (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The length of the vectors X and Y.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  X       (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCX)
</span><span class="comment">*</span><span class="comment">          On entry, X contains the N-vector X.
</span><span class="comment">*</span><span class="comment">          On exit, X is overwritten.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  INCX    (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The increment between successive elements of X. INCX &gt; 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Y       (input/output) COMPLEX*16 array, dimension (1+(N-1)*INCY)
</span><span class="comment">*</span><span class="comment">          On entry, Y contains the N-vector Y.
</span><span class="comment">*</span><span class="comment">          On exit, Y is overwritten.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  INCY    (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The increment between successive elements of Y. INCY &gt; 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  SSMIN   (output) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment">          The smallest singular value of the N-by-2 matrix A = ( X Y ).
</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>      DOUBLE PRECISION   ZERO
      PARAMETER          ( ZERO = 0.0D+0 )
      COMPLEX*16         CONE
      PARAMETER          ( CONE = ( 1.0D+0, 0.0D+0 ) )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      DOUBLE PRECISION   SSMAX
      COMPLEX*16         A11, A12, A22, C, TAU
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC          ABS, DCONJG
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      COMPLEX*16         ZDOTC
      EXTERNAL           ZDOTC
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Subroutines ..
</span>      EXTERNAL           <a name="DLAS2.70"></a><a href="dlas2.f.html#DLAS2.1">DLAS2</a>, ZAXPY, <a name="ZLARFG.70"></a><a href="zlarfg.f.html#ZLARFG.1">ZLARFG</a>
<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">     Quick return if possible
</span><span class="comment">*</span><span class="comment">
</span>      IF( N.LE.1 ) THEN
         SSMIN = ZERO
         RETURN
      END IF
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Compute the QR factorization of the N-by-2 matrix ( X Y )
</span><span class="comment">*</span><span class="comment">
</span>      CALL <a name="ZLARFG.83"></a><a href="zlarfg.f.html#ZLARFG.1">ZLARFG</a>( N, X( 1 ), X( 1+INCX ), INCX, TAU )
      A11 = X( 1 )
      X( 1 ) = CONE
<span class="comment">*</span><span class="comment">
</span>      C = -DCONJG( TAU )*ZDOTC( N, X, INCX, Y, INCY )
      CALL ZAXPY( N, C, X, INCX, Y, INCY )
<span class="comment">*</span><span class="comment">
</span>      CALL <a name="ZLARFG.90"></a><a href="zlarfg.f.html#ZLARFG.1">ZLARFG</a>( N-1, Y( 1+INCY ), Y( 1+2*INCY ), INCY, TAU )
<span class="comment">*</span><span class="comment">
</span>      A12 = Y( 1 )
      A22 = Y( 1+INCY )
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Compute the SVD of 2-by-2 Upper triangular matrix.
</span><span class="comment">*</span><span class="comment">
</span>      CALL <a name="DLAS2.97"></a><a href="dlas2.f.html#DLAS2.1">DLAS2</a>( ABS( A11 ), ABS( A12 ), ABS( A22 ), SSMIN, SSMAX )
<span class="comment">*</span><span class="comment">
</span>      RETURN
<span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     End of <a name="ZLAPLL.101"></a><a href="zlapll.f.html#ZLAPLL.1">ZLAPLL</a>
</span><span class="comment">*</span><span class="comment">
</span>      END

</pre>

 </body>
</html>

⌨️ 快捷键说明

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