1CGTRFS(1) LAPACK routine (version 3.2) CGTRFS(1)
2
3
4
6 CGTRFS - improves the computed solution to a system of linear equations
7 when the coefficient matrix is tridiagonal, and provides error bounds
8 and backward error estimates for the solution
9
11 SUBROUTINE CGTRFS( TRANS, N, NRHS, DL, D, DU, DLF, DF, DUF, DU2, IPIV,
12 B, LDB, X, LDX, FERR, BERR, WORK, RWORK, INFO )
13
14 CHARACTER TRANS
15
16 INTEGER INFO, LDB, LDX, N, NRHS
17
18 INTEGER IPIV( * )
19
20 REAL BERR( * ), FERR( * ), RWORK( * )
21
22 COMPLEX B( LDB, * ), D( * ), DF( * ), DL( * ), DLF( * ), DU(
23 * ), DU2( * ), DUF( * ), WORK( * ), X( LDX, * )
24
26 CGTRFS improves the computed solution to a system of linear equations
27 when the coefficient matrix is tridiagonal, and provides error bounds
28 and backward error estimates for the solution.
29
31 TRANS (input) CHARACTER*1
32 Specifies the form of the system of equations:
33 = 'N': A * X = B (No transpose)
34 = 'T': A**T * X = B (Transpose)
35 = 'C': A**H * X = B (Conjugate transpose)
36
37 N (input) INTEGER
38 The order of the matrix A. N >= 0.
39
40 NRHS (input) INTEGER
41 The number of right hand sides, i.e., the number of columns of
42 the matrix B. NRHS >= 0.
43
44 DL (input) COMPLEX array, dimension (N-1)
45 The (n-1) subdiagonal elements of A.
46
47 D (input) COMPLEX array, dimension (N)
48 The diagonal elements of A.
49
50 DU (input) COMPLEX array, dimension (N-1)
51 The (n-1) superdiagonal elements of A.
52
53 DLF (input) COMPLEX array, dimension (N-1)
54 The (n-1) multipliers that define the matrix L from the LU fac‐
55 torization of A as computed by CGTTRF.
56
57 DF (input) COMPLEX array, dimension (N)
58 The n diagonal elements of the upper triangular matrix U from
59 the LU factorization of A.
60
61 DUF (input) COMPLEX array, dimension (N-1)
62 The (n-1) elements of the first superdiagonal of U.
63
64 DU2 (input) COMPLEX array, dimension (N-2)
65 The (n-2) elements of the second superdiagonal of U.
66
67 IPIV (input) INTEGER array, dimension (N)
68 The pivot indices; for 1 <= i <= n, row i of the matrix was
69 interchanged with row IPIV(i). IPIV(i) will always be either i
70 or i+1; IPIV(i) = i indicates a row interchange was not
71 required.
72
73 B (input) COMPLEX array, dimension (LDB,NRHS)
74 The right hand side matrix B.
75
76 LDB (input) INTEGER
77 The leading dimension of the array B. LDB >= max(1,N).
78
79 X (input/output) COMPLEX array, dimension (LDX,NRHS)
80 On entry, the solution matrix X, as computed by CGTTRS. On
81 exit, the improved solution matrix X.
82
83 LDX (input) INTEGER
84 The leading dimension of the array X. LDX >= max(1,N).
85
86 FERR (output) REAL array, dimension (NRHS)
87 The estimated forward error bound for each solution vector X(j)
88 (the j-th column of the solution matrix X). If XTRUE is the
89 true solution corresponding to X(j), FERR(j) is an estimated
90 upper bound for the magnitude of the largest element in (X(j) -
91 XTRUE) divided by the magnitude of the largest element in X(j).
92 The estimate is as reliable as the estimate for RCOND, and is
93 almost always a slight overestimate of the true error.
94
95 BERR (output) REAL array, dimension (NRHS)
96 The componentwise relative backward error of each solution vec‐
97 tor X(j) (i.e., the smallest relative change in any element of
98 A or B that makes X(j) an exact solution).
99
100 WORK (workspace) COMPLEX array, dimension (2*N)
101
102 RWORK (workspace) REAL array, dimension (N)
103
104 INFO (output) INTEGER
105 = 0: successful exit
106 < 0: if INFO = -i, the i-th argument had an illegal value
107
109 ITMAX is the maximum number of steps of iterative refinement.
110
111
112
113 LAPACK routine (version 3.2) November 2008 CGTRFS(1)