dlahr2.f.html

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

HTML
263
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>dlahr2.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="DLAHR2.1"></a><a href="dlahr2.f.html#DLAHR2.1">DLAHR2</a>( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
<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            K, LDA, LDT, LDY, N, NB
<span class="comment">*</span><span class="comment">     ..
</span><span class="comment">*</span><span class="comment">     .. Array Arguments ..
</span>      DOUBLE PRECISION  A( LDA, * ), T( LDT, NB ), TAU( NB ),
     $                   Y( LDY, NB )
<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="DLAHR2.18"></a><a href="dlahr2.f.html#DLAHR2.1">DLAHR2</a> reduces the first NB columns of A real general n-BY-(n-k+1)
</span><span class="comment">*</span><span class="comment">  matrix A so that elements below the k-th subdiagonal are zero. The
</span><span class="comment">*</span><span class="comment">  reduction is performed by an orthogonal similarity transformation
</span><span class="comment">*</span><span class="comment">  Q' * A * Q. The routine returns the matrices V and T which determine
</span><span class="comment">*</span><span class="comment">  Q as a block reflector I - V*T*V', and also the matrix Y = A * V * T.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  This is an auxiliary routine called by <a name="DGEHRD.24"></a><a href="dgehrd.f.html#DGEHRD.1">DGEHRD</a>.
</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 A.
</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">          The offset for the reduction. Elements below the k-th
</span><span class="comment">*</span><span class="comment">          subdiagonal in the first NB columns are reduced to zero.
</span><span class="comment">*</span><span class="comment">          K &lt; N.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  NB      (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The number of columns to be reduced.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  A       (input/output) DOUBLE PRECISION array, dimension (LDA,N-K+1)
</span><span class="comment">*</span><span class="comment">          On entry, the n-by-(n-k+1) general matrix A.
</span><span class="comment">*</span><span class="comment">          On exit, the elements on and above the k-th subdiagonal in
</span><span class="comment">*</span><span class="comment">          the first NB columns are overwritten with the corresponding
</span><span class="comment">*</span><span class="comment">          elements of the reduced matrix; the elements below the k-th
</span><span class="comment">*</span><span class="comment">          subdiagonal, with the array TAU, represent the matrix Q as a
</span><span class="comment">*</span><span class="comment">          product of elementary reflectors. The other columns of A are
</span><span class="comment">*</span><span class="comment">          unchanged. See Further 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,N).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  TAU     (output) DOUBLE PRECISION array, dimension (NB)
</span><span class="comment">*</span><span class="comment">          The scalar factors of the elementary reflectors. See Further
</span><span class="comment">*</span><span class="comment">          Details.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  T       (output) DOUBLE PRECISION array, dimension (LDT,NB)
</span><span class="comment">*</span><span class="comment">          The upper triangular matrix T.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDT     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array T.  LDT &gt;= NB.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Y       (output) DOUBLE PRECISION array, dimension (LDY,NB)
</span><span class="comment">*</span><span class="comment">          The n-by-nb matrix Y.
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  LDY     (input) INTEGER
</span><span class="comment">*</span><span class="comment">          The leading dimension of the array Y. LDY &gt;= N.
</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">  The matrix Q is represented as a product of nb elementary reflectors
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     Q = H(1) H(2) . . . H(nb).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  Each H(i) has the form
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     H(i) = I - tau * v * v'
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  where tau is a real scalar, and v is a real vector with
</span><span class="comment">*</span><span class="comment">  v(1:i+k-1) = 0, v(i+k) = 1; v(i+k+1:n) is stored on exit in
</span><span class="comment">*</span><span class="comment">  A(i+k+1:n,i), and tau in TAU(i).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The elements of the vectors v together form the (n-k+1)-by-nb matrix
</span><span class="comment">*</span><span class="comment">  V which is needed, with T and Y, to apply the transformation to the
</span><span class="comment">*</span><span class="comment">  unreduced part of the matrix, using an update of the form:
</span><span class="comment">*</span><span class="comment">  A := (I - V*T*V') * (A - Y*V').
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  The contents of A on exit are illustrated by the following example
</span><span class="comment">*</span><span class="comment">  with n = 7, k = 3 and nb = 2:
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">     ( a   a   a   a   a )
</span><span class="comment">*</span><span class="comment">     ( a   a   a   a   a )
</span><span class="comment">*</span><span class="comment">     ( a   a   a   a   a )
</span><span class="comment">*</span><span class="comment">     ( h   h   a   a   a )
</span><span class="comment">*</span><span class="comment">     ( v1  h   a   a   a )
</span><span class="comment">*</span><span class="comment">     ( v1  v2  a   a   a )
</span><span class="comment">*</span><span class="comment">     ( v1  v2  a   a   a )
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  where a denotes an element of the original matrix A, h denotes a
</span><span class="comment">*</span><span class="comment">  modified element of the upper Hessenberg matrix H, and vi denotes an
</span><span class="comment">*</span><span class="comment">  element of the vector defining H(i).
</span><span class="comment">*</span><span class="comment">
</span><span class="comment">*</span><span class="comment">  This file is a slight modification of LAPACK-3.0's <a name="DLAHRD.103"></a><a href="dlahrd.f.html#DLAHRD.1">DLAHRD</a>
</span><span class="comment">*</span><span class="comment">  incorporating improvements proposed by Quintana-Orti and Van de
</span><span class="comment">*</span><span class="comment">  Gejin. Note that the entries of A(1:K,2:NB) differ from those
</span><span class="comment">*</span><span class="comment">  returned by the original LAPACK routine. This function is
</span><span class="comment">*</span><span class="comment">  not backward compatible with LAPACK3.0.
</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, ONE
      PARAMETER          ( ZERO = 0.0D+0, 

⌨️ 快捷键说明

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