1ZHPSV(1) LAPACK driver routine (version 3.1) ZHPSV(1)
2
3
4
6 ZHPSV - the solution to a complex system of linear equations A * X =
7 B,
8
10 SUBROUTINE ZHPSV( UPLO, N, NRHS, AP, IPIV, B, LDB, INFO )
11
12 CHARACTER UPLO
13
14 INTEGER INFO, LDB, N, NRHS
15
16 INTEGER IPIV( * )
17
18 COMPLEX*16 AP( * ), B( LDB, * )
19
21 ZHPSV computes the solution to a complex system of linear equations
22 A * X = B, where A is an N-by-N Hermitian matrix stored in packed
23 format and X and B are N-by-NRHS matrices.
24
25 The diagonal pivoting method is used to factor A as
26 A = U * D * U**H, if UPLO = 'U', or
27 A = L * D * L**H, if UPLO = 'L',
28 where U (or L) is a product of permutation and unit upper (lower) tri‐
29 angular matrices, D is Hermitian and block diagonal with 1-by-1 and
30 2-by-2 diagonal blocks. The factored form of A is then used to solve
31 the system of equations A * X = B.
32
33
35 UPLO (input) CHARACTER*1
36 = 'U': Upper triangle of A is stored;
37 = 'L': Lower triangle of A is stored.
38
39 N (input) INTEGER
40 The number of linear equations, i.e., the order of the matrix
41 A. N >= 0.
42
43 NRHS (input) INTEGER
44 The number of right hand sides, i.e., the number of columns of
45 the matrix B. NRHS >= 0.
46
47 AP (input/output) COMPLEX*16 array, dimension (N*(N+1)/2)
48 On entry, the upper or lower triangle of the Hermitian matrix
49 A, packed columnwise in a linear array. The j-th column of A
50 is stored in the array AP as follows: if UPLO = 'U', AP(i +
51 (j-1)*j/2) = A(i,j) for 1<=i<=j; if UPLO = 'L', AP(i +
52 (j-1)*(2n-j)/2) = A(i,j) for j<=i<=n. See below for further
53 details.
54
55 On exit, the block diagonal matrix D and the multipliers used
56 to obtain the factor U or L from the factorization A = U*D*U**H
57 or A = L*D*L**H as computed by ZHPTRF, stored as a packed tri‐
58 angular matrix in the same storage format as A.
59
60 IPIV (output) INTEGER array, dimension (N)
61 Details of the interchanges and the block structure of D, as
62 determined by ZHPTRF. If IPIV(k) > 0, then rows and columns k
63 and IPIV(k) were interchanged, and D(k,k) is a 1-by-1 diagonal
64 block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows
65 and columns k-1 and -IPIV(k) were interchanged and
66 D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and
67 IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k)
68 were interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal
69 block.
70
71 B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
72 On entry, the N-by-NRHS right hand side matrix B. On exit, if
73 INFO = 0, the N-by-NRHS solution matrix X.
74
75 LDB (input) INTEGER
76 The leading dimension of the array B. LDB >= max(1,N).
77
78 INFO (output) INTEGER
79 = 0: successful exit
80 < 0: if INFO = -i, the i-th argument had an illegal value
81 > 0: if INFO = i, D(i,i) is exactly zero. The factorization
82 has been completed, but the block diagonal matrix D is exactly
83 singular, so the solution could not be computed.
84
86 The packed storage scheme is illustrated by the following example when
87 N = 4, UPLO = 'U':
88
89 Two-dimensional storage of the Hermitian matrix A:
90
91 a11 a12 a13 a14
92 a22 a23 a24
93 a33 a34 (aij = conjg(aji))
94 a44
95
96 Packed storage of the upper triangle of A:
97
98 AP = [ a11, a12, a22, a13, a23, a33, a14, a24, a34, a44 ]
99
100
101
102
103 LAPACK driver routine (version 3.N1o)vember 2006 ZHPSV(1)