1DGGGLM(1)             LAPACK driver routine (version 3.2)            DGGGLM(1)
2
3
4

NAME

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

SYNOPSIS

9       SUBROUTINE DGGGLM( 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           DOUBLE         PRECISION A( LDA, * ), B( LDB, * ), D( * ), WORK(  *
15                          ), X( * ), Y( * )
16

PURPOSE

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

ARGUMENTS

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