1CHETF2(1) LAPACK routine (version 3.1) CHETF2(1)
2
3
4
6 CHETF2 - the factorization of a complex Hermitian matrix A using the
7 Bunch-Kaufman diagonal pivoting method
8
10 SUBROUTINE CHETF2( UPLO, N, A, LDA, IPIV, INFO )
11
12 CHARACTER UPLO
13
14 INTEGER INFO, LDA, N
15
16 INTEGER IPIV( * )
17
18 COMPLEX A( LDA, * )
19
21 CHETF2 computes the factorization of a complex Hermitian matrix A using
22 the Bunch-Kaufman diagonal pivoting method:
23
24 A = U*D*U' or A = L*D*L'
25
26 where U (or L) is a product of permutation and unit upper (lower) tri‐
27 angular matrices, U' is the conjugate transpose of U, and D is Hermit‐
28 ian and block diagonal with 1-by-1 and 2-by-2 diagonal blocks.
29
30 This is the unblocked version of the algorithm, calling Level 2 BLAS.
31
32
34 UPLO (input) CHARACTER*1
35 Specifies whether the upper or lower triangular part of the
36 Hermitian matrix A is stored:
37 = 'U': Upper triangular
38 = 'L': Lower triangular
39
40 N (input) INTEGER
41 The order of the matrix A. N >= 0.
42
43 A (input/output) COMPLEX array, dimension (LDA,N)
44 On entry, the Hermitian matrix A. If UPLO = 'U', the leading
45 n-by-n upper triangular part of A contains the upper triangular
46 part of the matrix A, and the strictly lower triangular part of
47 A is not referenced. If UPLO = 'L', the leading n-by-n lower
48 triangular part of A contains the lower triangular part of the
49 matrix A, and the strictly upper triangular part of A is not
50 referenced.
51
52 On exit, the block diagonal matrix D and the multipliers used
53 to obtain the factor U or L (see below for further details).
54
55 LDA (input) INTEGER
56 The leading dimension of the array A. LDA >= max(1,N).
57
58 IPIV (output) INTEGER array, dimension (N)
59 Details of the interchanges and the block structure of D. If
60 IPIV(k) > 0, then rows and columns k and IPIV(k) were inter‐
61 changed and D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U'
62 and IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and
63 -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2 diag‐
64 onal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0, then
65 rows and columns k+1 and -IPIV(k) were interchanged and
66 D(k:k+1,k:k+1) is a 2-by-2 diagonal block.
67
68 INFO (output) INTEGER
69 = 0: successful exit
70 < 0: if INFO = -k, the k-th argument had an illegal value
71 > 0: if INFO = k, D(k,k) is exactly zero. The factorization
72 has been completed, but the block diagonal matrix D is exactly
73 singular, and division by zero will occur if it is used to
74 solve a system of equations.
75
77 09-29-06 - patch from
78 Bobby Cheng, MathWorks
79
80 Replace l.210 and l.392
81 IF( MAX( ABSAKK, COLMAX ).EQ.ZERO ) THEN
82 by
83 IF( (MAX( ABSAKK, COLMAX ).EQ.ZERO) .OR. SISNAN(ABSAKK) ) THEN
84
85 01-01-96 - Based on modifications by
86 J. Lewis, Boeing Computer Services Company
87 A. Petitet, Computer Science Dept., Univ. of Tenn., Knoxville, USA
88
89 If UPLO = 'U', then A = U*D*U', where
90 U = P(n)*U(n)* ... *P(k)U(k)* ...,
91 i.e., U is a product of terms P(k)*U(k), where k decreases from n to 1
92 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and
93 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined
94 by IPIV(k), and U(k) is a unit upper triangular matrix, such that if
95 the diagonal block D(k) is of order s (s = 1 or 2), then
96
97 ( I v 0 ) k-s
98 U(k) = ( 0 I 0 ) s
99 ( 0 0 I ) n-k
100 k-s s n-k
101
102 If s = 1, D(k) overwrites A(k,k), and v overwrites A(1:k-1,k). If s =
103 2, the upper triangle of D(k) overwrites A(k-1,k-1), A(k-1,k), and
104 A(k,k), and v overwrites A(1:k-2,k-1:k).
105
106 If UPLO = 'L', then A = L*D*L', where
107 L = P(1)*L(1)* ... *P(k)*L(k)* ...,
108 i.e., L is a product of terms P(k)*L(k), where k increases from 1 to n
109 in steps of 1 or 2, and D is a block diagonal matrix with 1-by-1 and
110 2-by-2 diagonal blocks D(k). P(k) is a permutation matrix as defined
111 by IPIV(k), and L(k) is a unit lower triangular matrix, such that if
112 the diagonal block D(k) is of order s (s = 1 or 2), then
113
114 ( I 0 0 ) k-1
115 L(k) = ( 0 I 0 ) s
116 ( 0 v I ) n-k-s+1
117 k-1 s n-k-s+1
118
119 If s = 1, D(k) overwrites A(k,k), and v overwrites A(k+1:n,k). If s =
120 2, the lower triangle of D(k) overwrites A(k,k), A(k+1,k), and
121 A(k+1,k+1), and v overwrites A(k+2:n,k:k+1).
122
123
124
125
126 LAPACK routine (version 3.1) November 2006 CHETF2(1)