zlacn2.f.html

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

HTML
246
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>zlacn2.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="ZLACN2.1"></a><a href="zlacn2.f.html#ZLACN2.1">ZLACN2</a>( N, V, X, EST, KASE, ISAVE )
<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            KASE, N
      DOUBLE PRECISION   EST
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      INTEGER            ISAVE( 3 )
      COMPLEX*16         V( * ), X( * )
<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="ZLACN2.19"></a><a href="zlacn2.f.html#ZLACN2.1">ZLACN2</a> estimates the 1-norm of a square, complex matrix A.
</span><span class="comment">*</span><span class="comment">  Reverse communication is used for evaluating matrix-vector products.
</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 order of the matrix.  N &gt;= 1.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  V      (workspace) COMPLEX*16 array, dimension (N)
</span><span class="comment">*</span><span class="comment">         On the final return, V = A*W,  where  EST = norm(V)/norm(W)
</span><span class="comment">*</span><span class="comment">         (W is not returned).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  X      (input/output) COMPLEX*16 array, dimension (N)
</span><span class="comment">*</span><span class="comment">         On an intermediate return, X should be overwritten by
</span><span class="comment">*</span><span class="comment">               A * X,   if KASE=1,
</span><span class="comment">*</span><span class="comment">               A' * X,  if KASE=2,
</span><span class="comment">*</span><span class="comment">         where A' is the conjugate transpose of A, and <a name="ZLACN2.36"></a><a href="zlacn2.f.html#ZLACN2.1">ZLACN2</a> must be
</span><span class="comment">*</span><span class="comment">         re-called with all the other parameters unchanged.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  EST    (input/output) DOUBLE PRECISION
</span><span class="comment">*</span><span class="comment">         On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
</span><span class="comment">*</span><span class="comment">         unchanged from the previous call to <a name="ZLACN2.41"></a><a href="zlacn2.f.html#ZLACN2.1">ZLACN2</a>.
</span><span class="comment">*</span><span class="comment">         On exit, EST is an estimate (a lower bound) for norm(A). 
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  KASE   (input/output) INTEGER
</span><span class="comment">*</span><span class="comment">         On the initial call to <a name="ZLACN2.45"></a><a href="zlacn2.f.html#ZLACN2.1">ZLACN2</a>, KASE should be 0.
</span><span class="comment">*</span><span class="comment">         On an intermediate return, KASE will be 1 or 2, indicating
</span><span class="comment">*</span><span class="comment">         whether X should be overwritten by A * X  or A' * X.
</span><span class="comment">*</span><span class="comment">         On the final return from <a name="ZLACN2.48"></a><a href="zlacn2.f.html#ZLACN2.1">ZLACN2</a>, KASE will again be 0.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  ISAVE  (input/output) INTEGER array, dimension (3)
</span><span class="comment">*</span><span class="comment">         ISAVE is used to save variables between calls to <a name="ZLACN2.51"></a><a href="zlacn2.f.html#ZLACN2.1">ZLACN2</a>
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Further Details
</span><span class="comment">*</span><span class="comment">  ======= =======
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Contributed by Nick Higham, University of Manchester.
</span><span class="comment">*</span><span class="comment">  Originally named CONEST, dated March 16, 1988.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Reference: N.J. Higham, &quot;FORTRAN codes for estimating the one-norm of
</span><span class="comment">*</span><span class="comment">  a real or complex matrix, with applications to condition estimation&quot;,
</span><span class="comment">*</span><span class="comment">  ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Last modified:  April, 1999
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  This is a thread safe version of <a name="ZLACON.65"></a><a href="zlacon.f.html#ZLACON.1">ZLACON</a>, which uses the array ISAVE
</span><span class="comment">*</span><span class="comment">  in place of a SAVE statement, as follows:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     <a name="ZLACON.68"></a><a href="zlacon.f.html#ZLACON.1">ZLACON</a>     <a name="ZLACN2.68"></a><a href="zlacn2.f.html#ZLACN2.1">ZLACN2</a>
</span><span class="comment">*</span><span class="comment">      JUMP     ISAVE(1)
</span><span class="comment">*</span><span class="comment">      J        ISAVE(2)
</span><span class="comment">*</span><span class="comment">      ITER     ISAVE(3)
</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>      INTEGER              ITMAX
      PARAMETER          ( ITMAX = 5 )
      DOUBLE PRECISION     ONE,         TWO
      PARAMETER          ( ONE = 1.0D0, TWO = 2.0D0 )
      COMPLEX*16           CZERO, CONE
      PARAMETER          ( CZERO = ( 0.0D0, 0.0D0 ),
     $                            CONE = ( 1.0D0, 0.0D0 ) )
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Local Scalars ..
</span>      INTEGER            I, JLAST
      DOUBLE PRECISION   ABSXI, ALTSGN, ESTOLD, SAFMIN, TEMP
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Functions ..
</span>      INTEGER            <a name="IZMAX1.89"></a><a href="izmax1.f.html#IZMAX1.1">IZMAX1</a>
      DOUBLE PRECISION   <a name="DLAMCH.90"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>, <a name="DZSUM1.90"></a><a href="dzsum1.f.html#DZSUM1.1">DZSUM1</a>
      EXTERNAL           <a name="IZMAX1.91"></a><a href="izmax1.f.html#IZMAX1.1">IZMAX1</a>, <a name="DLAMCH.91"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>, <a name="DZSUM1.91"></a><a href="dzsum1.f.html#DZSUM1.1">DZSUM1</a>
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. External Subroutines ..
</span>      EXTERNAL           ZCOPY
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Intrinsic Functions ..
</span>      INTRINSIC          ABS, DBLE, DCMPLX, DIMAG
<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>      SAFMIN = <a name="DLAMCH.101"></a><a href="dlamch.f.html#DLAMCH.1">DLAMCH</a>( <span class="string">'Safe minimum'</span> )
      IF( KASE.EQ.0 ) THEN
         DO 10 I = 1, N
            X( I ) = DCMPLX( ONE / DBLE( N ) )

⌨️ 快捷键说明

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