1SSYGVD(1) LAPACK driver routine (version 3.1) SSYGVD(1)
2
3
4
6 SSYGVD - all the eigenvalues, and optionally, the eigenvectors of a
7 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 SSYGVD( ITYPE, JOBZ, UPLO, N, A, LDA, B, LDB, W, WORK,
12 LWORK, IWORK, LIWORK, INFO )
13
14 CHARACTER JOBZ, UPLO
15
16 INTEGER INFO, ITYPE, LDA, LDB, LIWORK, LWORK, N
17
18 INTEGER IWORK( * )
19
20 REAL A( LDA, * ), B( LDB, * ), W( * ), WORK( * )
21
23 SSYGVD computes all the eigenvalues, and optionally, the eigenvectors
24 of a real generalized symmetric-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 symmetric and B is also positive definite. If eigen‐
27 vectors are desired, it uses a divide and conquer algorithm.
28
29 The divide and conquer algorithm makes very mild assumptions about
30 floating point arithmetic. It will work on machines with a guard digit
31 in add/subtract, or on those binary machines without guard digits which
32 subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could
33 conceivably fail on hexadecimal or decimal machines without guard dig‐
34 its, but we know of none.
35
36
38 ITYPE (input) INTEGER
39 Specifies the problem type to be solved:
40 = 1: A*x = (lambda)*B*x
41 = 2: A*B*x = (lambda)*x
42 = 3: B*A*x = (lambda)*x
43
44 JOBZ (input) CHARACTER*1
45 = 'N': Compute eigenvalues only;
46 = 'V': Compute eigenvalues and eigenvectors.
47
48 UPLO (input) CHARACTER*1
49 = 'U': Upper triangles of A and B are stored;
50 = 'L': Lower triangles of A and B are stored.
51
52 N (input) INTEGER
53 The order of the matrices A and B. N >= 0.
54
55 A (input/output) REAL array, dimension (LDA, N)
56 On entry, the symmetric matrix A. If UPLO = 'U', the leading
57 N-by-N upper triangular part of A contains the upper triangular
58 part of the matrix A. If UPLO = 'L', the leading N-by-N lower
59 triangular part of A contains the lower triangular part of the
60 matrix A.
61
62 On exit, if JOBZ = 'V', then if INFO = 0, A contains the matrix
63 Z of eigenvectors. The eigenvectors are normalized as follows:
64 if ITYPE = 1 or 2, Z**T*B*Z = I; if ITYPE = 3, Z**T*inv(B)*Z =
65 I. If JOBZ = 'N', then on exit the upper triangle (if
66 UPLO='U') or the lower triangle (if UPLO='L') of A, including
67 the diagonal, is destroyed.
68
69 LDA (input) INTEGER
70 The leading dimension of the array A. LDA >= max(1,N).
71
72 B (input/output) REAL array, dimension (LDB, N)
73 On entry, the symmetric matrix B. If UPLO = 'U', the leading
74 N-by-N upper triangular part of B contains the upper triangular
75 part of the matrix B. If UPLO = 'L', the leading N-by-N lower
76 triangular part of B contains the lower triangular part of the
77 matrix B.
78
79 On exit, if INFO <= N, the part of B containing the matrix is
80 overwritten by the triangular factor U or L from the Cholesky
81 factorization B = U**T*U or B = L*L**T.
82
83 LDB (input) INTEGER
84 The leading dimension of the array B. LDB >= max(1,N).
85
86 W (output) REAL array, dimension (N)
87 If INFO = 0, the eigenvalues in ascending order.
88
89 WORK (workspace/output) REAL array, dimension (MAX(1,LWORK))
90 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
91
92 LWORK (input) INTEGER
93 The dimension of the array WORK. If N <= 1,
94 LWORK >= 1. If JOBZ = 'N' and N > 1, LWORK >= 2*N+1. If JOBZ
95 = 'V' and N > 1, LWORK >= 1 + 6*N + 2*N**2.
96
97 If LWORK = -1, then a workspace query is assumed; the routine
98 only calculates the optimal sizes of the WORK and IWORK arrays,
99 returns these values as the first entries of the WORK and IWORK
100 arrays, and no error message related to LWORK or LIWORK is
101 issued by XERBLA.
102
103 IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
104 On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
105
106 LIWORK (input) INTEGER
107 The dimension of the array IWORK. If N <= 1,
108 LIWORK >= 1. If JOBZ = 'N' and N > 1, LIWORK >= 1. If JOBZ
109 = 'V' and N > 1, LIWORK >= 3 + 5*N.
110
111 If LIWORK = -1, then a workspace query is assumed; the routine
112 only calculates the optimal sizes of the WORK and IWORK arrays,
113 returns these values as the first entries of the WORK and IWORK
114 arrays, and no error message related to LWORK or LIWORK is
115 issued by XERBLA.
116
117 INFO (output) INTEGER
118 = 0: successful exit
119 < 0: if INFO = -i, the i-th argument had an illegal value
120 > 0: SPOTRF or SSYEVD returned an error code:
121 <= N: if INFO = i and JOBZ = 'N', then the algorithm failed to
122 converge; i off-diagonal elements of an intermediate tridiago‐
123 nal form did not converge to zero; if INFO = i and JOBZ = 'V',
124 then the algorithm failed to compute an eigenvalue while work‐
125 ing on the submatrix lying in rows and columns INFO/(N+1)
126 through mod(INFO,N+1); > N: if INFO = N + i, for 1 <= i <= N,
127 then the leading minor of order i of B is not positive defi‐
128 nite. The factorization of B could not be completed and no ei‐
129 genvalues or eigenvectors were computed.
130
132 Based on contributions by
133 Mark Fahey, Department of Mathematics, Univ. of Kentucky, USA
134
135 Modified so that no backsubstitution is performed if SSYEVD fails to
136 converge (NEIG in old code could be greater than N causing out of
137 bounds reference to A - reported by Ralf Meyer). Also corrected the
138 description of INFO and the test on ITYPE. Sven, 16 Feb 05.
139
140
141
142 LAPACK driver routine (version 3.N1o)vember 2006 SSYGVD(1)