1SSYGVX(1) LAPACK driver routine (version 3.2) SSYGVX(1)
2
3
4
6 SSYGVX - computes selected eigenvalues, and optionally, eigenvectors of
7 a real generalized symmetric-definite eigenproblem, of the form
8 A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x
9
11 SUBROUTINE SSYGVX( ITYPE, JOBZ, RANGE, UPLO, N, A, LDA, B, LDB, VL, VU,
12 IL, IU, ABSTOL, M, W, Z, LDZ, WORK, LWORK, IWORK,
13 IFAIL, INFO )
14
15 CHARACTER JOBZ, RANGE, UPLO
16
17 INTEGER IL, INFO, ITYPE, IU, LDA, LDB, LDZ, LWORK, M, N
18
19 REAL ABSTOL, VL, VU
20
21 INTEGER IFAIL( * ), IWORK( * )
22
23 REAL A( LDA, * ), B( LDB, * ), W( * ), WORK( * ), Z( LDZ,
24 * )
25
27 SSYGVX computes selected eigenvalues, and optionally, eigenvectors of a
28 real generalized symmetric-definite eigenproblem, of the form
29 A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x. Here A and B
30 are assumed to be symmetric and B is also positive definite. Eigenval‐
31 ues and eigenvectors can be selected by specifying either a range of
32 values or a range of indices for the desired eigenvalues.
33
35 ITYPE (input) INTEGER
36 Specifies the problem type to be solved:
37 = 1: A*x = (lambda)*B*x
38 = 2: A*B*x = (lambda)*x
39 = 3: B*A*x = (lambda)*x
40
41 JOBZ (input) CHARACTER*1
42 = 'N': Compute eigenvalues only;
43 = 'V': Compute eigenvalues and eigenvectors.
44
45 RANGE (input) CHARACTER*1
46 = 'A': all eigenvalues will be found.
47 = 'V': all eigenvalues in the half-open interval (VL,VU] will
48 be found. = 'I': the IL-th through IU-th eigenvalues will be
49 found.
50
51 UPLO (input) CHARACTER*1
52 = 'U': Upper triangle of A and B are stored;
53 = 'L': Lower triangle of A and B are stored.
54
55 N (input) INTEGER
56 The order of the matrix pencil (A,B). N >= 0.
57
58 A (input/output) REAL array, dimension (LDA, N)
59 On entry, the symmetric matrix A. If UPLO = 'U', the leading
60 N-by-N upper triangular part of A contains the upper triangular
61 part of the matrix A. If UPLO = 'L', the leading N-by-N lower
62 triangular part of A contains the lower triangular part of the
63 matrix A. On exit, the lower triangle (if UPLO='L') or the
64 upper triangle (if UPLO='U') of A, including the diagonal, is
65 destroyed.
66
67 LDA (input) INTEGER
68 The leading dimension of the array A. LDA >= max(1,N).
69
70 B (input/output) REAL array, dimension (LDA, N)
71 On entry, the symmetric matrix B. If UPLO = 'U', the leading
72 N-by-N upper triangular part of B contains the upper triangular
73 part of the matrix B. If UPLO = 'L', the leading N-by-N lower
74 triangular part of B contains the lower triangular part of the
75 matrix B. On exit, if INFO <= N, the part of B containing the
76 matrix is overwritten by the triangular factor U or L from the
77 Cholesky factorization B = U**T*U or B = L*L**T.
78
79 LDB (input) INTEGER
80 The leading dimension of the array B. LDB >= max(1,N).
81
82 VL (input) REAL
83 VU (input) REAL If RANGE='V', the lower and upper bounds
84 of the interval to be searched for eigenvalues. VL < VU. Not
85 referenced if RANGE = 'A' or 'I'.
86
87 IL (input) INTEGER
88 IU (input) INTEGER If RANGE='I', the indices (in ascending
89 order) of the smallest and largest eigenvalues to be returned.
90 1 <= IL <= IU <= N, if N > 0; IL = 1 and IU = 0 if N = 0. Not
91 referenced if RANGE = 'A' or 'V'.
92
93 ABSTOL (input) REAL
94 The absolute error tolerance for the eigenvalues. An approxi‐
95 mate eigenvalue is accepted as converged when it is determined
96 to lie in an interval [a,b] of width less than or equal to
97 ABSTOL + EPS * max( |a|,|b| ) , where EPS is the machine pre‐
98 cision. If ABSTOL is less than or equal to zero, then EPS*|T|
99 will be used in its place, where |T| is the 1-norm of the
100 tridiagonal matrix obtained by reducing A to tridiagonal form.
101 Eigenvalues will be computed most accurately when ABSTOL is set
102 to twice the underflow threshold 2*DLAMCH('S'), not zero. If
103 this routine returns with INFO>0, indicating that some eigen‐
104 vectors did not converge, try setting ABSTOL to 2*SLAMCH('S').
105
106 M (output) INTEGER
107 The total number of eigenvalues found. 0 <= M <= N. If RANGE
108 = 'A', M = N, and if RANGE = 'I', M = IU-IL+1.
109
110 W (output) REAL array, dimension (N)
111 On normal exit, the first M elements contain the selected ei‐
112 genvalues in ascending order.
113
114 Z (output) REAL array, dimension (LDZ, max(1,M))
115 If JOBZ = 'N', then Z is not referenced. If JOBZ = 'V', then
116 if INFO = 0, the first M columns of Z contain the orthonormal
117 eigenvectors of the matrix A corresponding to the selected ei‐
118 genvalues, with the i-th column of Z holding the eigenvector
119 associated with W(i). The eigenvectors are normalized as fol‐
120 lows: if ITYPE = 1 or 2, Z**T*B*Z = I; if ITYPE = 3,
121 Z**T*inv(B)*Z = I. If an eigenvector fails to converge, then
122 that column of Z contains the latest approximation to the
123 eigenvector, and the index of the eigenvector is returned in
124 IFAIL. Note: the user must ensure that at least max(1,M) col‐
125 umns are supplied in the array Z; if RANGE = 'V', the exact
126 value of M is not known in advance and an upper bound must be
127 used.
128
129 LDZ (input) INTEGER
130 The leading dimension of the array Z. LDZ >= 1, and if JOBZ =
131 'V', LDZ >= max(1,N).
132
133 WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
134 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
135
136 LWORK (input) INTEGER
137 The length of the array WORK. LWORK >= max(1,8*N). For opti‐
138 mal efficiency, LWORK >= (NB+3)*N, where NB is the blocksize
139 for SSYTRD returned by ILAENV. If LWORK = -1, then a workspace
140 query is assumed; the routine only calculates the optimal size
141 of the WORK array, returns this value as the first entry of the
142 WORK array, and no error message related to LWORK is issued by
143 XERBLA.
144
145 IWORK (workspace) INTEGER array, dimension (5*N)
146
147 IFAIL (output) INTEGER array, dimension (N)
148 If JOBZ = 'V', then if INFO = 0, the first M elements of IFAIL
149 are zero. If INFO > 0, then IFAIL contains the indices of the
150 eigenvectors that failed to converge. If JOBZ = 'N', then
151 IFAIL is not referenced.
152
153 INFO (output) INTEGER
154 = 0: successful exit
155 < 0: if INFO = -i, the i-th argument had an illegal value
156 > 0: SPOTRF or SSYEVX returned an error code:
157 <= N: if INFO = i, SSYEVX failed to converge; i eigenvectors
158 failed to converge. Their indices are stored in array IFAIL.
159 > N: if INFO = N + i, for 1 <= i <= N, then the leading minor
160 of order i of B is not positive definite. The factorization of
161 B could not be completed and no eigenvalues or eigenvectors
162 were computed.
163
165 Based on contributions by
166 Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
167
168
169
170 LAPACK driver routine (version 3.N2o)vember 2008 SSYGVX(1)