1CSTEDC(1) LAPACK routine (version 3.2) CSTEDC(1)
2
3
4
6 CSTEDC - computes all eigenvalues and, optionally, eigenvectors of a
7 symmetric tridiagonal matrix using the divide and conquer method
8
10 SUBROUTINE CSTEDC( COMPZ, N, D, E, Z, LDZ, WORK, LWORK, RWORK, LRWORK,
11 IWORK, LIWORK, INFO )
12
13 CHARACTER COMPZ
14
15 INTEGER INFO, LDZ, LIWORK, LRWORK, LWORK, N
16
17 INTEGER IWORK( * )
18
19 REAL D( * ), E( * ), RWORK( * )
20
21 COMPLEX WORK( * ), Z( LDZ, * )
22
24 CSTEDC computes all eigenvalues and, optionally, eigenvectors of a sym‐
25 metric tridiagonal matrix using the divide and conquer method. The
26 eigenvectors of a full or band complex Hermitian matrix can also be
27 found if CHETRD or CHPTRD or CHBTRD has been used to reduce this matrix
28 to tridiagonal form.
29 This code makes very mild assumptions about floating point arithmetic.
30 It will work on machines with a guard digit in add/subtract, or on
31 those binary machines without guard digits which subtract like the Cray
32 X-MP, Cray Y-MP, Cray C-90, or Cray-2. It could conceivably fail on
33 hexadecimal or decimal machines without guard digits, but we know of
34 none. See SLAED3 for details.
35
37 COMPZ (input) CHARACTER*1
38 = 'N': Compute eigenvalues only.
39 = 'I': Compute eigenvectors of tridiagonal matrix also.
40 = 'V': Compute eigenvectors of original Hermitian matrix also.
41 On entry, Z contains the unitary matrix used to reduce the
42 original matrix to tridiagonal form.
43
44 N (input) INTEGER
45 The dimension of the symmetric tridiagonal matrix. N >= 0.
46
47 D (input/output) REAL array, dimension (N)
48 On entry, the diagonal elements of the tridiagonal matrix. On
49 exit, if INFO = 0, the eigenvalues in ascending order.
50
51 E (input/output) REAL array, dimension (N-1)
52 On entry, the subdiagonal elements of the tridiagonal matrix.
53 On exit, E has been destroyed.
54
55 Z (input/output) COMPLEX array, dimension (LDZ,N)
56 On entry, if COMPZ = 'V', then Z contains the unitary matrix
57 used in the reduction to tridiagonal form. On exit, if INFO =
58 0, then if COMPZ = 'V', Z contains the orthonormal eigenvectors
59 of the original Hermitian matrix, and if COMPZ = 'I', Z con‐
60 tains the orthonormal eigenvectors of the symmetric tridiagonal
61 matrix. If COMPZ = 'N', then Z is not referenced.
62
63 LDZ (input) INTEGER
64 The leading dimension of the array Z. LDZ >= 1. If eigenvec‐
65 tors are desired, then LDZ >= max(1,N).
66
67 WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
68 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
69
70 LWORK (input) INTEGER
71 The dimension of the array WORK. If COMPZ = 'N' or 'I', or N
72 <= 1, LWORK must be at least 1. If COMPZ = 'V' and N > 1,
73 LWORK must be at least N*N. Note that for COMPZ = 'V', then if
74 N is less than or equal to the minimum divide size, usually 25,
75 then LWORK need only be 1. If LWORK = -1, then a workspace
76 query is assumed; the routine only calculates the optimal sizes
77 of the WORK, RWORK and IWORK arrays, returns these values as
78 the first entries of the WORK, RWORK and IWORK arrays, and no
79 error message related to LWORK or LRWORK or LIWORK is issued by
80 XERBLA.
81
82 RWORK (workspace/output) REAL array, dimension (MAX(1,LRWORK))
83 On exit, if INFO = 0, RWORK(1) returns the optimal LRWORK.
84
85 LRWORK (input) INTEGER
86 The dimension of the array RWORK. If COMPZ = 'N' or N <= 1,
87 LRWORK must be at least 1. If COMPZ = 'V' and N > 1, LRWORK
88 must be at least 1 + 3*N + 2*N*lg N + 3*N**2 , where lg( N ) =
89 smallest integer k such that 2**k >= N. If COMPZ = 'I' and N >
90 1, LRWORK must be at least 1 + 4*N + 2*N**2 . Note that for
91 COMPZ = 'I' or 'V', then if N is less than or equal to the min‐
92 imum divide size, usually 25, then LRWORK need only be
93 max(1,2*(N-1)). If LRWORK = -1, then a workspace query is
94 assumed; the routine only calculates the optimal sizes of the
95 WORK, RWORK and IWORK arrays, returns these values as the first
96 entries of the WORK, RWORK and IWORK arrays, and no error mes‐
97 sage related to LWORK or LRWORK or LIWORK is issued by XERBLA.
98
99 IWORK (workspace/output) INTEGER array, dimension (MAX(1,LIWORK))
100 On exit, if INFO = 0, IWORK(1) returns the optimal LIWORK.
101
102 LIWORK (input) INTEGER
103 The dimension of the array IWORK. If COMPZ = 'N' or N <= 1,
104 LIWORK must be at least 1. If COMPZ = 'V' or N > 1, LIWORK
105 must be at least 6 + 6*N + 5*N*lg N. If COMPZ = 'I' or N > 1,
106 LIWORK must be at least 3 + 5*N . Note that for COMPZ = 'I' or
107 'V', then if N is less than or equal to the minimum divide
108 size, usually 25, then LIWORK need only be 1. If LIWORK = -1,
109 then a workspace query is assumed; the routine only calculates
110 the optimal sizes of the WORK, RWORK and IWORK arrays, returns
111 these values as the first entries of the WORK, RWORK and IWORK
112 arrays, and no error message related to LWORK or LRWORK or
113 LIWORK is issued by XERBLA.
114
115 INFO (output) INTEGER
116 = 0: successful exit.
117 < 0: if INFO = -i, the i-th argument had an illegal value.
118 > 0: The algorithm failed to compute an eigenvalue while work‐
119 ing on the submatrix lying in rows and columns INFO/(N+1)
120 through mod(INFO,N+1).
121
123 Based on contributions by
124 Jeff Rutter, Computer Science Division, University of California
125 at Berkeley, USA
126
127
128
129 LAPACK routine (version 3.2) November 2008 CSTEDC(1)