1CPTEQR(1) LAPACK routine (version 3.2) CPTEQR(1)
2
3
4
6 CPTEQR - computes all eigenvalues and, optionally, eigenvectors of a
7 symmetric positive definite tridiagonal matrix by first factoring the
8 matrix using SPTTRF and then calling CBDSQR to compute the singular
9 values of the bidiagonal factor
10
12 SUBROUTINE CPTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO )
13
14 CHARACTER COMPZ
15
16 INTEGER INFO, LDZ, N
17
18 REAL D( * ), E( * ), WORK( * )
19
20 COMPLEX Z( LDZ, * )
21
23 CPTEQR computes all eigenvalues and, optionally, eigenvectors of a sym‐
24 metric positive definite tridiagonal matrix by first factoring the
25 matrix using SPTTRF and then calling CBDSQR to compute the singular
26 values of the bidiagonal factor. This routine computes the eigenvalues
27 of the positive definite tridiagonal matrix to high relative accuracy.
28 This means that if the eigenvalues range over many orders of magnitude
29 in size, then the small eigenvalues and corresponding eigenvectors will
30 be computed more accurately than, for example, with the standard QR
31 method. The eigenvectors of a full or band positive definite Hermitian
32 matrix can also be found if CHETRD, CHPTRD, or CHBTRD has been used to
33 reduce this matrix to tridiagonal form. (The reduction to tridiagonal
34 form, however, may preclude the possibility of obtaining high relative
35 accuracy in the small eigenvalues of the original matrix, if these ei‐
36 genvalues range over many orders of magnitude.)
37
39 COMPZ (input) CHARACTER*1
40 = 'N': Compute eigenvalues only.
41 = 'V': Compute eigenvectors of original Hermitian matrix also.
42 Array Z contains the unitary matrix used to reduce the original
43 matrix to tridiagonal form. = 'I': Compute eigenvectors of
44 tridiagonal matrix also.
45
46 N (input) INTEGER
47 The order of the matrix. N >= 0.
48
49 D (input/output) REAL array, dimension (N)
50 On entry, the n diagonal elements of the tridiagonal matrix.
51 On normal exit, D contains the eigenvalues, in descending
52 order.
53
54 E (input/output) REAL array, dimension (N-1)
55 On entry, the (n-1) subdiagonal elements of the tridiagonal
56 matrix. On exit, E has been destroyed.
57
58 Z (input/output) COMPLEX array, dimension (LDZ, N)
59 On entry, if COMPZ = 'V', the unitary matrix used in the reduc‐
60 tion to tridiagonal form. On exit, if COMPZ = 'V', the
61 orthonormal eigenvectors of the original Hermitian matrix; if
62 COMPZ = 'I', the orthonormal eigenvectors of the tridiagonal
63 matrix. If INFO > 0 on exit, Z contains the eigenvectors asso‐
64 ciated with only the stored eigenvalues. If COMPZ = 'N', then
65 Z is not referenced.
66
67 LDZ (input) INTEGER
68 The leading dimension of the array Z. LDZ >= 1, and if COMPZ =
69 'V' or 'I', LDZ >= max(1,N).
70
71 WORK (workspace) REAL array, dimension (4*N)
72
73 INFO (output) INTEGER
74 = 0: successful exit.
75 < 0: if INFO = -i, the i-th argument had an illegal value.
76 > 0: if INFO = i, and i is: <= N the Cholesky factorization
77 of the matrix could not be performed because the i-th principal
78 minor was not positive definite. > N the SVD algorithm
79 failed to converge; if INFO = N+i, i off-diagonal elements of
80 the bidiagonal factor did not converge to zero.
81
82
83
84 LAPACK routine (version 3.2) November 2008 CPTEQR(1)