1CHEGV(1) LAPACK driver routine (version 3.1) CHEGV(1)
2
3
4
6 CHEGV - all the eigenvalues, and optionally, the eigenvectors of a com‐
7 plex generalized Hermitian-definite eigenproblem, of the form
8 A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x
9
11 SUBROUTINE CHEGV( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK, LWORK,
12 RWORK, INFO )
13
14 CHARACTER JOBZ, UPLO
15
16 INTEGER INFO, ITYPE, LDA, LDB, LWORK, N
17
18 REAL RWORK( * ), W( * )
19
20 COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
21
23 CHEGV computes all the eigenvalues, and optionally, the eigenvectors of
24 a complex generalized Hermitian-definite eigenproblem, of the form
25 A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and B
26 are assumed to be Hermitian and B is also
27 positive definite.
28
29
31 ITYPE (input) INTEGER
32 Specifies the problem type to be solved:
33 = 1: A*x = (lambda)*B*x
34 = 2: A*B*x = (lambda)*x
35 = 3: B*A*x = (lambda)*x
36
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 triangles of A and B are stored;
43 = 'L': Lower triangles of A and B are stored.
44
45 N (input) INTEGER
46 The order of the matrices A and B. N >= 0.
47
48 A (input/output) COMPLEX array, dimension (LDA, N)
49 On entry, the Hermitian matrix A. If UPLO = 'U', the leading
50 N-by-N upper triangular part of A contains the upper triangular
51 part of the matrix A. If UPLO = 'L', the leading N-by-N lower
52 triangular part of A contains the lower triangular part of the
53 matrix A.
54
55 On exit, if JOBZ = 'V', then if INFO = 0, A contains the matrix
56 Z of eigenvectors. The eigenvectors are normalized as follows:
57 if ITYPE = 1 or 2, Z**H*B*Z = I; if ITYPE = 3, Z**H*inv(B)*Z =
58 I. If JOBZ = 'N', then on exit the upper triangle (if
59 UPLO='U') or the lower triangle (if UPLO='L') of A, including
60 the diagonal, is destroyed.
61
62 LDA (input) INTEGER
63 The leading dimension of the array A. LDA >= max(1,N).
64
65 B (input/output) COMPLEX array, dimension (LDB, N)
66 On entry, the Hermitian positive definite matrix B. If UPLO =
67 'U', the leading N-by-N upper triangular part of B contains the
68 upper triangular part of the matrix B. If UPLO = 'L', the
69 leading N-by-N lower triangular part of B contains the lower
70 triangular part of the matrix B.
71
72 On exit, if INFO <= N, the part of B containing the matrix is
73 overwritten by the triangular factor U or L from the Cholesky
74 factorization B = U**H*U or B = L*L**H.
75
76 LDB (input) INTEGER
77 The leading dimension of the array B. LDB >= max(1,N).
78
79 W (output) REAL array, dimension (N)
80 If INFO = 0, the eigenvalues in ascending order.
81
82 WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
83 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
84
85 LWORK (input) INTEGER
86 The length of the array WORK. LWORK >= max(1,2*N-1). For
87 optimal efficiency, LWORK >= (NB+1)*N, where NB is the block‐
88 size for CHETRD returned by ILAENV.
89
90 If LWORK = -1, then a workspace query is assumed; the routine
91 only calculates the optimal size of the WORK array, returns
92 this value as the first entry of the WORK array, and no error
93 message related to LWORK is issued by XERBLA.
94
95 RWORK (workspace) REAL array, dimension (max(1, 3*N-2))
96
97 INFO (output) INTEGER
98 = 0: successful exit
99 < 0: if INFO = -i, the i-th argument had an illegal value
100 > 0: CPOTRF or CHEEV returned an error code:
101 <= N: if INFO = i, CHEEV failed to converge; i off-diagonal
102 elements of an intermediate tridiagonal form did not converge
103 to zero; > N: if INFO = N + i, for 1 <= i <= N, then the
104 leading minor of order i of B is not positive definite. The
105 factorization of B could not be completed and no eigenvalues or
106 eigenvectors were computed.
107
108
109
110 LAPACK driver routine (version 3.N1o)vember 2006 CHEGV(1)