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