1DLAHR2  ‐ the first NB columns of A real general n‐BY‐(n‐k+1) ma‐
2trix A so that elements below the k‐th subdiagonal are zero  SUB‐
3ROUTINE DLAHR2( N, K, NB, A, LDA, TAU, T, LDT, Y, LDY )
4    INTEGER K, LDA, LDT, LDY, N, NB
5    DOUBLE  PRECISION  A(  LDA,  * ), T( LDT, NB ), TAU( NB ), Y(
6LDY, NB ) DLAHR2 reduces the first NB columns of A  real  general
7n‐BY‐(n‐k+1) matrix A so that elements below the k‐th subdiagonal
8are zero. The reduction is performed by an orthogonal  similarity
9transformation Q' * A * Q. The routine returns the matrices V and
10T which determine Q as a block reflector I ‐ V*T*V', and also the
11matrix Y = A * V * T.
12
13This is an auxiliary routine called by DGEHRD.
14
15N        (input) INTEGER The order of the matrix A.  K       (in‐
16put) INTEGER The offset for the reduction. Elements below the  k‐
17th  subdiagonal in the first NB columns are reduced to zero.  K <
18N.  NB      (input) INTEGER The number of columns to be  reduced.
19A        (input/output) DOUBLE PRECISION array, dimension (LDA,N‐
20K+1) On entry, the n‐by‐(n‐k+1) general matrix A.  On  exit,  the
21elements  on  and above the k‐th subdiagonal in the first NB col‐
22umns are overwritten with the corresponding elements of  the  re‐
23duced  matrix;  the elements below the k‐th subdiagonal, with the
24array TAU, represent the matrix Q as a product of elementary  re‐
25flectors.  The  other columns of A are unchanged. See Further De‐
26tails.  LDA     (input) INTEGER The leading dimension of the  ar‐
27ray  A.   LDA >= max(1,N).  TAU     (output) DOUBLE PRECISION ar‐
28ray, dimension (NB) The scalar factors of the elementary  reflec‐
29tors. See Further Details.  T       (output) DOUBLE PRECISION ar‐
30ray, dimension (LDT,NB)  The  upper  triangular  matrix  T.   LDT
31(input) INTEGER The leading dimension of the array T.  LDT >= NB.
32Y       (output) DOUBLE PRECISION array, dimension  (LDY,NB)  The
33n‐by‐nb  matrix Y.  LDY     (input) INTEGER The leading dimension
34of the array Y. LDY >= N.  The matrix Q is represented as a prod‐
35uct of nb elementary reflectors
36
37   Q = H(1) H(2) . . . H(nb).
38
39Each H(i) has the form
40
41   H(i) = I ‐ tau * v * v'
42
43where tau is a real scalar, and v is a real vector with
44v(1:i+k‐1)  =  0,  v(i+k)  =  1;  v(i+k+1:n) is stored on exit in
45A(i+k+1:n,i), and tau in TAU(i).
46
47The elements of the vectors v together form the (n‐k+1)‐by‐nb ma‐
48trix V which is needed, with T and Y, to apply the transformation
49to the unreduced part of the matrix, using an update of the form:
50A := (I ‐ V*T*V') * (A ‐ Y*V').
51
52The  contents of A on exit are illustrated by the following exam‐
53ple with n = 7, k = 3 and nb = 2:
54
55   ( a   a   a   a   a )
56   ( a   a   a   a   a )
57   ( a   a   a   a   a )
58   ( h   h   a   a   a )
59   ( v1  h   a   a   a )
60   ( v1  v2  a   a   a )
61   ( v1  v2  a   a   a )
62
63where a denotes an element of the original matrix A, h denotes  a
64modified element of the upper Hessenberg matrix H, and vi denotes
65an element of the vector defining H(i).
66
67This file is a slight modification of LAPACK‐3.0's DLAHRD  incor‐
68porating improvements proposed by Quintana‐Orti and Van de Gejin.
69Note that the entries of A(1:K,2:NB) differ from  those  returned
70by  the  original  LAPACK  routine. This function is not backward
71compatible with LAPACK3.0.
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
Impressum