1CGGGLM(1)             LAPACK driver routine (version 3.1)            CGGGLM(1)
2
3
4

NAME

6       CGGGLM - a general Gauss-Markov linear model (GLM) problem
7

SYNOPSIS

9       SUBROUTINE CGGGLM( N,  M, P, A, LDA, B, LDB, D, X, Y, WORK, LWORK, INFO
10                          )
11
12           INTEGER        INFO, LDA, LDB, LWORK, M, N, P
13
14           COMPLEX        A( LDA, * ), B( LDB, * ), D( * ), WORK( * ), X( * ),
15                          Y( * )
16

PURPOSE

18       CGGGLM solves a general Gauss-Markov linear model (GLM) problem:
19
20               minimize || y ||_2   subject to   d = A*x + B*y
21                   x
22
23       where A is an N-by-M matrix, B is an N-by-P matrix, and d is a given N-
24       vector. It is assumed that M <= N <= M+P, and
25
26                  rank(A) = M    and    rank( A B ) = N.
27
28       Under these assumptions, the constrained equation is always consistent,
29       and there is a unique solution x and a minimal 2-norm solution y, which
30       is obtained using a generalized QR factorization of the matrices (A, B)
31       given by
32
33          A = Q*(R),   B = Q*T*Z.
34                (0)
35
36       In  particular, if matrix B is square nonsingular, then the problem GLM
37       is equivalent to the following weighted linear least squares problem
38
39                    minimize || inv(B)*(d-A*x) ||_2
40                        x
41
42       where inv(B) denotes the inverse of B.
43
44

ARGUMENTS

46       N       (input) INTEGER
47               The number of rows of the matrices A and B.  N >= 0.
48
49       M       (input) INTEGER
50               The number of columns of the matrix A.  0 <= M <= N.
51
52       P       (input) INTEGER
53               The number of columns of the matrix B.  P >= N-M.
54
55       A       (input/output) COMPLEX array, dimension (LDA,M)
56               On entry, the N-by-M matrix A.  On exit, the  upper  triangular
57               part of the array A contains the M-by-M upper triangular matrix
58               R.
59
60       LDA     (input) INTEGER
61               The leading dimension of the array A. LDA >= max(1,N).
62
63       B       (input/output) COMPLEX array, dimension (LDB,P)
64               On entry, the N-by-P matrix B.  On exit, if N <= P,  the  upper
65               triangle  of  the  subarray  B(1:N,P-N+1:P) contains the N-by-N
66               upper triangular matrix T; if N > P, the elements on and  above
67               the  (N-P)th  subdiagonal  contain the N-by-P upper trapezoidal
68               matrix T.
69
70       LDB     (input) INTEGER
71               The leading dimension of the array B. LDB >= max(1,N).
72
73       D       (input/output) COMPLEX array, dimension (N)
74               On entry, D is the left hand side  of  the  GLM  equation.   On
75               exit, D is destroyed.
76
77       X       (output) COMPLEX array, dimension (M)
78               Y        (output) COMPLEX array, dimension (P) On exit, X and Y
79               are the solutions of the GLM problem.
80
81       WORK    (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
82               On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
83
84       LWORK   (input) INTEGER
85               The dimension of the array WORK. LWORK  >=  max(1,N+M+P).   For
86               optimum  performance, LWORK >= M+min(N,P)+max(N,P)*NB, where NB
87               is an upper  bound  for  the  optimal  blocksizes  for  CGEQRF,
88               CGERQF, CUNMQR and CUNMRQ.
89
90               If  LWORK  = -1, then a workspace query is assumed; the routine
91               only calculates the optimal size of  the  WORK  array,  returns
92               this  value  as the first entry of the WORK array, and no error
93               message related to LWORK is issued by XERBLA.
94
95       INFO    (output) INTEGER
96               = 0:  successful exit.
97               < 0:  if INFO = -i, the i-th argument had an illegal value.
98               = 1:  the upper triangular factor R associated with  A  in  the
99               generalized QR factorization of the pair (A, B) is singular, so
100               that rank(A) < M; the least squares solution could not be  com‐
101               puted.   =  2:   the  bottom  (N-M)  by (N-M) part of the upper
102               trapezoidal factor T associated with B in  the  generalized  QR
103               factorization of the pair (A, B) is singular, so that rank( A B
104               ) < N; the least squares solution could not be computed.
105
106
107
108 LAPACK driver routine (version 3.N1o)vember 2006                       CGGGLM(1)
Impressum