1SPTSVX(1) LAPACK routine (version 3.1) SPTSVX(1)
2
3
4
6 SPTSVX - the factorization A = L*D*L**T to compute the solution to a
7 real system of linear equations A*X = B, where A is an N-by-N symmetric
8 positive definite tridiagonal matrix and X and B are N-by-NRHS matrices
9
11 SUBROUTINE SPTSVX( FACT, N, NRHS, D, E, DF, EF, B, LDB, X, LDX, RCOND,
12 FERR, BERR, WORK, INFO )
13
14 CHARACTER FACT
15
16 INTEGER INFO, LDB, LDX, N, NRHS
17
18 REAL RCOND
19
20 REAL B( LDB, * ), BERR( * ), D( * ), DF( * ), E( * ), EF(
21 * ), FERR( * ), WORK( * ), X( LDX, * )
22
24 SPTSVX uses the factorization A = L*D*L**T to compute the solution to a
25 real system of linear equations A*X = B, where A is an N-by-N symmetric
26 positive definite tridiagonal matrix and X and B are N-by-NRHS matri‐
27 ces.
28
29 Error bounds on the solution and a condition estimate are also pro‐
30 vided.
31
32
34 The following steps are performed:
35
36 1. If FACT = 'N', the matrix A is factored as A = L*D*L**T, where L
37 is a unit lower bidiagonal matrix and D is diagonal. The
38 factorization can also be regarded as having the form
39 A = U**T*D*U.
40
41 2. If the leading i-by-i principal minor is not positive definite,
42 then the routine returns with INFO = i. Otherwise, the factored
43 form of A is used to estimate the condition number of the matrix
44 A. If the reciprocal of the condition number is less than machine
45 precision, INFO = N+1 is returned as a warning, but the routine
46 still goes on to solve for X and compute error bounds as
47 described below.
48
49 3. The system of equations is solved for X using the factored form
50 of A.
51
52 4. Iterative refinement is applied to improve the computed solution
53 matrix and calculate error bounds and backward error estimates
54 for it.
55
56
58 FACT (input) CHARACTER*1
59 Specifies whether or not the factored form of A has been sup‐
60 plied on entry. = 'F': On entry, DF and EF contain the fac‐
61 tored form of A. D, E, DF, and EF will not be modified. =
62 'N': The matrix A will be copied to DF and EF and factored.
63
64 N (input) INTEGER
65 The order of the matrix A. N >= 0.
66
67 NRHS (input) INTEGER
68 The number of right hand sides, i.e., the number of columns of
69 the matrices B and X. NRHS >= 0.
70
71 D (input) REAL array, dimension (N)
72 The n diagonal elements of the tridiagonal matrix A.
73
74 E (input) REAL array, dimension (N-1)
75 The (n-1) subdiagonal elements of the tridiagonal matrix A.
76
77 DF (input or output) REAL array, dimension (N)
78 If FACT = 'F', then DF is an input argument and on entry con‐
79 tains the n diagonal elements of the diagonal matrix D from the
80 L*D*L**T factorization of A. If FACT = 'N', then DF is an out‐
81 put argument and on exit contains the n diagonal elements of
82 the diagonal matrix D from the L*D*L**T factorization of A.
83
84 EF (input or output) REAL array, dimension (N-1)
85 If FACT = 'F', then EF is an input argument and on entry con‐
86 tains the (n-1) subdiagonal elements of the unit bidiagonal
87 factor L from the L*D*L**T factorization of A. If FACT = 'N',
88 then EF is an output argument and on exit contains the (n-1)
89 subdiagonal elements of the unit bidiagonal factor L from the
90 L*D*L**T factorization of A.
91
92 B (input) REAL array, dimension (LDB,NRHS)
93 The N-by-NRHS right hand side matrix B.
94
95 LDB (input) INTEGER
96 The leading dimension of the array B. LDB >= max(1,N).
97
98 X (output) REAL array, dimension (LDX,NRHS)
99 If INFO = 0 of INFO = N+1, the N-by-NRHS solution matrix X.
100
101 LDX (input) INTEGER
102 The leading dimension of the array X. LDX >= max(1,N).
103
104 RCOND (output) REAL
105 The reciprocal condition number of the matrix A. If RCOND is
106 less than the machine precision (in particular, if RCOND = 0),
107 the matrix is singular to working precision. This condition is
108 indicated by a return code of INFO > 0.
109
110 FERR (output) REAL array, dimension (NRHS)
111 The forward error bound for each solution vector X(j) (the j-th
112 column of the solution matrix X). If XTRUE is the true solu‐
113 tion corresponding to X(j), FERR(j) is an estimated upper bound
114 for the magnitude of the largest element in (X(j) - XTRUE)
115 divided by the magnitude of the largest element in X(j).
116
117 BERR (output) REAL array, dimension (NRHS)
118 The componentwise relative backward error of each solution vec‐
119 tor X(j) (i.e., the smallest relative change in any element of
120 A or B that makes X(j) an exact solution).
121
122 WORK (workspace) REAL array, dimension (2*N)
123
124 INFO (output) INTEGER
125 = 0: successful exit
126 < 0: if INFO = -i, the i-th argument had an illegal value
127 > 0: if INFO = i, and i is
128 <= N: the leading minor of order i of A is not positive defi‐
129 nite, so the factorization could not be completed, and the
130 solution has not been computed. RCOND = 0 is returned. = N+1:
131 U is nonsingular, but RCOND is less than machine precision,
132 meaning that the matrix is singular to working precision. Nev‐
133 ertheless, the solution and error bounds are computed because
134 there are a number of situations where the computed solution
135 can be more accurate than the value of RCOND would suggest.
136
137
138
139 LAPACK routine (version 3.1) November 2006 SPTSVX(1)