1ZHPEVD(1) LAPACK driver routine (version 3.1) ZHPEVD(1)
2
3
4
6 ZHPEVD - all the eigenvalues and, optionally, eigenvectors of a complex
7 Hermitian matrix A in packed storage
8
10 SUBROUTINE ZHPEVD( JOBZ, UPLO, N, AP, W, Z, LDZ, WORK, LWORK, RWORK,
11 LRWORK, IWORK, LIWORK, INFO )
12
13 CHARACTER JOBZ, UPLO
14
15 INTEGER INFO, LDZ, LIWORK, LRWORK, LWORK, N
16
17 INTEGER IWORK( * )
18
19 DOUBLE PRECISION RWORK( * ), W( * )
20
21 COMPLEX*16 AP( * ), WORK( * ), Z( LDZ, * )
22
24 ZHPEVD computes all the eigenvalues and, optionally, eigenvectors of a
25 complex Hermitian matrix A in packed storage. If eigenvectors are
26 desired, it uses a divide and conquer algorithm.
27
28 The divide and conquer algorithm makes very mild assumptions about
29 floating point arithmetic. It will work on machines with a guard digit
30 in add/subtract, or on those binary machines without guard digits which
31 subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could
32 conceivably fail on hexadecimal or decimal machines without guard dig‐
33 its, but we know of none.
34
35
37 JOBZ (input) CHARACTER*1
38 = 'N': Compute eigenvalues only;
39 = 'V': Compute eigenvalues and eigenvectors.
40
41 UPLO (input) CHARACTER*1
42 = 'U': Upper triangle of A is stored;
43 = 'L': Lower triangle of A is stored.
44
45 N (input) INTEGER
46 The order of the matrix A. N >= 0.
47
48 AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
49 On entry, the upper or lower triangle of the Hermitian matrix
50 A, packed columnwise in a linear array. The j-th column of A
51 is stored in the array AP as follows: if UPLO = 'U', AP(i +
52 (j-1)*j/2) = A(i,j) for 1<=i<=j; if UPLO = 'L', AP(i +
53 (j-1)*(2*n-j)/2) = A(i,j) for j<=i<=n.
54
55 On exit, AP is overwritten by values generated during the
56 reduction to tridiagonal form. If UPLO = 'U', the diagonal and
57 first superdiagonal of the tridiagonal matrix T overwrite the
58 corresponding elements of A, and if UPLO = 'L', the diagonal
59 and first subdiagonal of T overwrite the corresponding elements
60 of A.
61
62 W (output) DOUBLE PRECISION array, dimension (N)
63 If INFO = 0, the eigenvalues in ascending order.
64
65 Z (output) COMPLEX*16 array, dimension (LDZ, N)
66 If JOBZ = 'V', then if INFO = 0, Z contains the orthonormal
67 eigenvectors of the matrix A, with the i-th column of Z holding
68 the eigenvector associated with W(i). If JOBZ = 'N', then Z is
69 not referenced.
70
71 LDZ (input) INTEGER
72 The leading dimension of the array Z. LDZ >= 1, and if JOBZ =
73 'V', LDZ >= max(1,N).
74
75 WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
76 On exit, if INFO = 0, WORK(1) returns the required LWORK.
77
78 LWORK (input) INTEGER
79 The dimension of array WORK. If N <= 1, LWORK
80 must be at least 1. If JOBZ = 'N' and N > 1, LWORK must be at
81 least N. If JOBZ = 'V' and N > 1, LWORK must be at least 2*N.
82
83 If LWORK = -1, then a workspace query is assumed; the routine
84 only calculates the required sizes of the WORK, RWORK and IWORK
85 arrays, returns these values as the first entries of the WORK,
86 RWORK and IWORK arrays, and no error message related to LWORK
87 or LRWORK or LIWORK is issued by XERBLA.
88
89 RWORK (workspace/output) DOUBLE PRECISION array,
90 dimension (LRWORK) On exit, if INFO = 0, RWORK(1) returns the
91 required LRWORK.
92
93 LRWORK (input) INTEGER
94 The dimension of array RWORK. If N <= 1, LRWORK
95 must be at least 1. If JOBZ = 'N' and N > 1, LRWORK must be at
96 least N. If JOBZ = 'V' and N > 1, LRWORK must be at least 1 +
97 5*N + 2*N**2.
98
99 If LRWORK = -1, then a workspace query is assumed; the routine
100 only calculates the required sizes of the WORK, RWORK and IWORK
101 arrays, returns these values as the first entries of the WORK,
102 RWORK and IWORK arrays, and no error message related to LWORK
103 or LRWORK or LIWORK is issued by XERBLA.
104
105 IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
106 On exit, if INFO = 0, IWORK(1) returns the required LIWORK.
107
108 LIWORK (input) INTEGER
109 The dimension of array IWORK. If JOBZ = 'N' or N <= 1, LIWORK
110 must be at least 1. If JOBZ = 'V' and N > 1, LIWORK must be
111 at least 3 + 5*N.
112
113 If LIWORK = -1, then a workspace query is assumed; the routine
114 only calculates the required sizes of the WORK, RWORK and IWORK
115 arrays, returns these values as the first entries of the WORK,
116 RWORK and IWORK arrays, and no error message related to LWORK
117 or LRWORK or LIWORK is issued by XERBLA.
118
119 INFO (output) INTEGER
120 = 0: successful exit
121 < 0: if INFO = -i, the i-th argument had an illegal value.
122 > 0: if INFO = i, the algorithm failed to converge; i off-
123 diagonal elements of an intermediate tridiagonal form did not
124 converge to zero.
125
126
127
128 LAPACK driver routine (version 3.N1o)vember 2006 ZHPEVD(1)