1CGESV(1) LAPACK driver routine (version 3.1) CGESV(1)
2
3
4
6 CGESV - the solution to a complex system of linear equations A * X =
7 B,
8
10 SUBROUTINE CGESV( N, NRHS, A, LDA, IPIV, B, LDB, INFO )
11
12 INTEGER INFO, LDA, LDB, N, NRHS
13
14 INTEGER IPIV( * )
15
16 COMPLEX A( LDA, * ), B( LDB, * )
17
19 CGESV computes the solution to a complex system of linear equations
20 A * X = B, where A is an N-by-N matrix and X and B are N-by-NRHS
21 matrices.
22
23 The LU decomposition with partial pivoting and row interchanges is used
24 to factor A as
25 A = P * L * U,
26 where P is a permutation matrix, L is unit lower triangular, and U is
27 upper triangular. The factored form of A is then used to solve the
28 system of equations A * X = B.
29
30
32 N (input) INTEGER
33 The number of linear equations, i.e., the order of the matrix
34 A. N >= 0.
35
36 NRHS (input) INTEGER
37 The number of right hand sides, i.e., the number of columns of
38 the matrix B. NRHS >= 0.
39
40 A (input/output) COMPLEX array, dimension (LDA,N)
41 On entry, the N-by-N coefficient matrix A. On exit, the fac‐
42 tors L and U from the factorization A = P*L*U; the unit diago‐
43 nal elements of L are not stored.
44
45 LDA (input) INTEGER
46 The leading dimension of the array A. LDA >= max(1,N).
47
48 IPIV (output) INTEGER array, dimension (N)
49 The pivot indices that define the permutation matrix P; row i
50 of the matrix was interchanged with row IPIV(i).
51
52 B (input/output) COMPLEX array, dimension (LDB,NRHS)
53 On entry, the N-by-NRHS matrix of right hand side matrix B. On
54 exit, if INFO = 0, the N-by-NRHS solution matrix X.
55
56 LDB (input) INTEGER
57 The leading dimension of the array B. LDB >= max(1,N).
58
59 INFO (output) INTEGER
60 = 0: successful exit
61 < 0: if INFO = -i, the i-th argument had an illegal value
62 > 0: if INFO = i, U(i,i) is exactly zero. The factorization
63 has been completed, but the factor U is exactly singular, so
64 the solution could not be computed.
65
66
67
68 LAPACK driver routine (version 3.N1o)vember 2006 CGESV(1)