1DHSEQR(1) LAPACK driver routine (version 3.2) DHSEQR(1)
2
3
4
6 DHSEQR - DHSEQR compute the eigenvalues of a Hessenberg matrix H and,
7 optionally, the matrices T and Z from the Schur decomposition H = Z T
8 Z**T, where T is an upper quasi-triangular matrix (the Schur form),
9 and Z is the orthogonal matrix of Schur vectors
10
12 SUBROUTINE DHSEQR( JOB, COMPZ, N, ILO, IHI, H, LDH, WR, WI, Z, LDZ,
13 WORK, LWORK, INFO )
14
15 INTEGER IHI, ILO, INFO, LDH, LDZ, LWORK, N
16
17 CHARACTER COMPZ, JOB
18
19 DOUBLE PRECISION H( LDH, * ), WI( * ), WORK( * ), WR( * ),
20 Z( LDZ, * )
21
23 DHSEQR computes the eigenvalues of a Hessenberg matrix H
24 and, optionally, the matrices T and Z from the Schur decomposition
25 H = Z T Z**T, where T is an upper quasi-triangular matrix (the
26 Schur form), and Z is the orthogonal matrix of Schur vectors.
27 Optionally Z may be postmultiplied into an input orthogonal
28 matrix Q so that this routine can give the Schur factorization
29 of a matrix A which has been reduced to the Hessenberg form H
30 by the orthogonal matrix Q: A = Q*H*Q**T = (QZ)*T*(QZ)**T.
31
33 JOB (input) CHARACTER*1
34 = 'E': compute eigenvalues only;
35 = 'S': compute eigenvalues and the Schur form T. COMPZ (input)
36 CHARACTER*1
37 = 'N': no Schur vectors are computed;
38 = 'I': Z is initialized to the unit matrix and the matrix Z of
39 Schur vectors of H is returned; = 'V': Z must contain an orthog‐
40 onal matrix Q on entry, and the product Q*Z is returned.
41
42 N (input) INTEGER
43 The order of the matrix H. N .GE. 0.
44
45 ILO (input) INTEGER
46 IHI (input) INTEGER It is assumed that H is already upper tri‐
47 angular in rows and columns 1:ILO-1 and IHI+1:N. ILO and IHI are
48 normally set by a previous call to DGEBAL, and then passed to
49 DGEHRD when the matrix output by DGEBAL is reduced to Hessenberg
50 form. Otherwise ILO and IHI should be set to 1 and N respec‐
51 tively. If N.GT.0, then 1.LE.ILO.LE.IHI.LE.N. If N = 0, then
52 ILO = 1 and IHI = 0.
53
54 H (input/output) DOUBLE PRECISION array, dimension (LDH,N)
55 On entry, the upper Hessenberg matrix H. On exit, if INFO = 0
56 and JOB = 'S', then H contains the upper quasi-triangular matrix
57 T from the Schur decomposition (the Schur form); 2-by-2 diagonal
58 blocks (corresponding to complex conjugate pairs of eigenvalues)
59 are returned in standard form, with H(i,i) = H(i+1,i+1) and
60 H(i+1,i)*H(i,i+1).LT.0. If INFO = 0 and JOB = 'E', the contents
61 of H are unspecified on exit. (The output value of H when
62 INFO.GT.0 is given under the description of INFO below.) Unlike
63 earlier versions of DHSEQR, this subroutine may explicitly H(i,j)
64 = 0 for i.GT.j and j = 1, 2, ... ILO-1 or j = IHI+1, IHI+2, ...
65 N.
66
67 LDH (input) INTEGER
68 The leading dimension of the array H. LDH .GE. max(1,N).
69
70 WR (output) DOUBLE PRECISION array, dimension (N)
71 WI (output) DOUBLE PRECISION array, dimension (N) The real and
72 imaginary parts, respectively, of the computed eigenvalues. If
73 two eigenvalues are computed as a complex conjugate pair, they
74 are stored in consecutive elements of WR and WI, say the i-th and
75 (i+1)th, with WI(i) .GT. 0 and WI(i+1) .LT. 0. If JOB = 'S', the
76 eigenvalues are stored in the same order as on the diagonal of
77 the Schur form returned in H, with WR(i) = H(i,i) and, if
78 H(i:i+1,i:i+1) is a 2-by-2 diagonal block, WI(i) =
79 sqrt(-H(i+1,i)*H(i,i+1)) and WI(i+1) = -WI(i).
80
81 Z (input/output) DOUBLE PRECISION array, dimension (LDZ,N)
82 If COMPZ = 'N', Z is not referenced. If COMPZ = 'I', on entry Z
83 need not be set and on exit, if INFO = 0, Z contains the orthogo‐
84 nal matrix Z of the Schur vectors of H. If COMPZ = 'V', on entry
85 Z must contain an N-by-N matrix Q, which is assumed to be equal
86 to the unit matrix except for the submatrix Z(ILO:IHI,ILO:IHI).
87 On exit, if INFO = 0, Z contains Q*Z. Normally Q is the orthogo‐
88 nal matrix generated by DORGHR after the call to DGEHRD which
89 formed the Hessenberg matrix H. (The output value of Z when
90 INFO.GT.0 is given under the description of INFO below.)
91
92 LDZ (input) INTEGER
93 The leading dimension of the array Z. if COMPZ = 'I' or COMPZ =
94 'V', then LDZ.GE.MAX(1,N). Otherwize, LDZ.GE.1.
95
96 WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
97 On exit, if INFO = 0, WORK(1) returns an estimate of the optimal
98 value for LWORK. LWORK (input) INTEGER The dimension of the
99 array WORK. LWORK .GE. max(1,N) is sufficient and delivers very
100 good and sometimes optimal performance. However, LWORK as large
101 as 11*N may be required for optimal performance. A workspace
102 query is recommended to determine the optimal workspace size. If
103 LWORK = -1, then DHSEQR does a workspace query. In this case,
104 DHSEQR checks the input parameters and estimates the optimal
105 workspace size for the given values of N, ILO and IHI. The esti‐
106 mate is returned in WORK(1). No error message related to LWORK
107 is issued by XERBLA. Neither H nor Z are accessed.
108
109 INFO (output) INTEGER
110 = 0: successful exit
111 value
112 the eigenvalues. Elements 1:ilo-1 and i+1:n of WR and WI contain
113 those eigenvalues which have been successfully computed. (Fail‐
114 ures are rare.) If INFO .GT. 0 and JOB = 'E', then on exit, the
115 remaining unconverged eigenvalues are the eigen- values of the
116 upper Hessenberg matrix rows and columns ILO through INFO of the
117 final, output value of H. If INFO .GT. 0 and JOB = 'S', then
118 on exit
119
120 (*) (initial value of H)*U = U*(final value of H)
121 where U is an orthogonal matrix. The final value of H is upper
122 Hessenberg and quasi-triangular in rows and columns INFO+1 through
123 IHI. If INFO .GT. 0 and COMPZ = 'V', then on exit (final value of
124 Z) = (initial value of Z)*U where U is the orthogonal matrix in
125 (*) (regard- less of the value of JOB.) If INFO .GT. 0 and COMPZ
126 = 'I', then on exit (final value of Z) = U where U is the orthog‐
127 onal matrix in (*) (regard- less of the value of JOB.) If INFO
128 .GT. 0 and COMPZ = 'N', then Z is not accessed.
129
130
131
132 LAPACK driver routine (version 3.N2o)vember 2008 DHSEQR(1)