1CGGLSE(1) LAPACK driver routine (version 3.1) CGGLSE(1)
2
3
4
6 CGGLSE - the linear equality-constrained least squares (LSE) problem
7
9 SUBROUTINE CGGLSE( M, N, P, A, LDA, B, LDB, C, D, X, WORK, LWORK, INFO
10 )
11
12 INTEGER INFO, LDA, LDB, LWORK, M, N, P
13
14 COMPLEX A( LDA, * ), B( LDB, * ), C( * ), D( * ), WORK( * ),
15 X( * )
16
18 CGGLSE solves the linear equality-constrained least squares (LSE) prob‐
19 lem:
20
21 minimize || c - A*x ||_2 subject to B*x = d
22
23 where A is an M-by-N matrix, B is a P-by-N matrix, c is a given M-vec‐
24 tor, and d is a given P-vector. It is assumed that
25 P <= N <= M+P, and
26
27 rank(B) = P and rank( (A) ) = N.
28 ( (B) )
29
30 These conditions ensure that the LSE problem has a unique solution,
31 which is obtained using a generalized RQ factorization of the matrices
32 (B, A) given by
33
34 B = (0 R)*Q, A = Z*T*Q.
35
36
38 M (input) INTEGER
39 The number of rows of the matrix A. M >= 0.
40
41 N (input) INTEGER
42 The number of columns of the matrices A and B. N >= 0.
43
44 P (input) INTEGER
45 The number of rows of the matrix B. 0 <= P <= N <= M+P.
46
47 A (input/output) COMPLEX array, dimension (LDA,N)
48 On entry, the M-by-N matrix A. On exit, the elements on and
49 above the diagonal of the array contain the min(M,N)-by-N upper
50 trapezoidal matrix T.
51
52 LDA (input) INTEGER
53 The leading dimension of the array A. LDA >= max(1,M).
54
55 B (input/output) COMPLEX array, dimension (LDB,N)
56 On entry, the P-by-N matrix B. On exit, the upper triangle of
57 the subarray B(1:P,N-P+1:N) contains the P-by-P upper triangu‐
58 lar matrix R.
59
60 LDB (input) INTEGER
61 The leading dimension of the array B. LDB >= max(1,P).
62
63 C (input/output) COMPLEX array, dimension (M)
64 On entry, C contains the right hand side vector for the least
65 squares part of the LSE problem. On exit, the residual sum of
66 squares for the solution is given by the sum of squares of ele‐
67 ments N-P+1 to M of vector C.
68
69 D (input/output) COMPLEX array, dimension (P)
70 On entry, D contains the right hand side vector for the con‐
71 strained equation. On exit, D is destroyed.
72
73 X (output) COMPLEX array, dimension (N)
74 On exit, X is the solution of the LSE problem.
75
76 WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
77 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
78
79 LWORK (input) INTEGER
80 The dimension of the array WORK. LWORK >= max(1,M+N+P). For
81 optimum performance LWORK >= P+min(M,N)+max(M,N)*NB, where NB
82 is an upper bound for the optimal blocksizes for CGEQRF,
83 CGERQF, CUNMQR and CUNMRQ.
84
85 If LWORK = -1, then a workspace query is assumed; the routine
86 only calculates the optimal size of the WORK array, returns
87 this value as the first entry of the WORK array, and no error
88 message related to LWORK is issued by XERBLA.
89
90 INFO (output) INTEGER
91 = 0: successful exit.
92 < 0: if INFO = -i, the i-th argument had an illegal value.
93 = 1: the upper triangular factor R associated with B in the
94 generalized RQ factorization of the pair (B, A) is singular, so
95 that rank(B) < P; the least squares solution could not be com‐
96 puted. = 2: the (N-P) by (N-P) part of the upper trapezoidal
97 factor T associated with A in the generalized RQ factorization
98 of the pair (B, A) is singular, so that rank( (A) ) < N; the
99 least squares solution could not ( (B) ) be computed.
100
101
102
103 LAPACK driver routine (version 3.N1o)vember 2006 CGGLSE(1)