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