1CGELSX(1) LAPACK driver routine (version 3.1) CGELSX(1)
2
3
4
6 CGELSX - i deprecated and has been replaced by routine CGELSY
7
9 SUBROUTINE CGELSX( M, N, NRHS, A, LDA, B, LDB, JPVT, RCOND, RANK, WORK,
10 RWORK, INFO )
11
12 INTEGER INFO, LDA, LDB, M, N, NRHS, RANK
13
14 REAL RCOND
15
16 INTEGER JPVT( * )
17
18 REAL RWORK( * )
19
20 COMPLEX A( LDA, * ), B( LDB, * ), WORK( * )
21
23 This routine is deprecated and has been replaced by routine CGELSY.
24
25 CGELSX computes the minimum-norm solution to a complex linear least
26 squares problem:
27 minimize || A * X - B ||
28 using a complete orthogonal factorization of A. A is an M-by-N matrix
29 which may be rank-deficient.
30
31 Several right hand side vectors b and solution vectors x can be handled
32 in a single call; they are stored as the columns of the M-by-NRHS right
33 hand side matrix B and the N-by-NRHS solution matrix X.
34
35 The routine first computes a QR factorization with column pivoting:
36 A * P = Q * [ R11 R12 ]
37 [ 0 R22 ]
38 with R11 defined as the largest leading submatrix whose estimated con‐
39 dition number is less than 1/RCOND. The order of R11, RANK, is the
40 effective rank of A.
41
42 Then, R22 is considered to be negligible, and R12 is annihilated by
43 unitary transformations from the right, arriving at the complete
44 orthogonal factorization:
45 A * P = Q * [ T11 0 ] * Z
46 [ 0 0 ]
47 The minimum-norm solution is then
48 X = P * Z' [ inv(T11)*Q1'*B ]
49 [ 0 ]
50 where Q1 consists of the first RANK columns of Q.
51
52
54 M (input) INTEGER
55 The number of rows of the matrix A. M >= 0.
56
57 N (input) INTEGER
58 The number of columns of the matrix A. N >= 0.
59
60 NRHS (input) INTEGER
61 The number of right hand sides, i.e., the number of columns of
62 matrices B and X. NRHS >= 0.
63
64 A (input/output) COMPLEX array, dimension (LDA,N)
65 On entry, the M-by-N matrix A. On exit, A has been overwritten
66 by details of its complete orthogonal factorization.
67
68 LDA (input) INTEGER
69 The leading dimension of the array A. LDA >= max(1,M).
70
71 B (input/output) COMPLEX array, dimension (LDB,NRHS)
72 On entry, the M-by-NRHS right hand side matrix B. On exit, the
73 N-by-NRHS solution matrix X. If m >= n and RANK = n, the
74 residual sum-of-squares for the solution in the i-th column is
75 given by the sum of squares of elements N+1:M in that column.
76
77 LDB (input) INTEGER
78 The leading dimension of the array B. LDB >= max(1,M,N).
79
80 JPVT (input/output) INTEGER array, dimension (N)
81 On entry, if JPVT(i) .ne. 0, the i-th column of A is an initial
82 column, otherwise it is a free column. Before the QR factor‐
83 ization of A, all initial columns are permuted to the leading
84 positions; only the remaining free columns are moved as a
85 result of column pivoting during the factorization. On exit,
86 if JPVT(i) = k, then the i-th column of A*P was the k-th column
87 of A.
88
89 RCOND (input) REAL
90 RCOND is used to determine the effective rank of A, which is
91 defined as the order of the largest leading triangular subma‐
92 trix R11 in the QR factorization with pivoting of A, whose
93 estimated condition number < 1/RCOND.
94
95 RANK (output) INTEGER
96 The effective rank of A, i.e., the order of the submatrix R11.
97 This is the same as the order of the submatrix T11 in the com‐
98 plete orthogonal factorization of A.
99
100 WORK (workspace) COMPLEX array, dimension
101 (min(M,N) + max( N, 2*min(M,N)+NRHS )),
102
103 RWORK (workspace) REAL array, dimension (2*N)
104
105 INFO (output) INTEGER
106 = 0: successful exit
107 < 0: if INFO = -i, the i-th argument had an illegal value
108
109
110
111 LAPACK driver routine (version 3.N1o)vember 2006 CGELSX(1)