PrevUpHomeNext
ggglm
Prototype

There is one prototype of ggglm available, please see below.

ggglm( MatrixA& a, MatrixB& b, VectorD& d, VectorX& x, VectorY& y );

Description

ggglm (short for $FRIENDLY_NAME) provides a C++ interface to LAPACK routines SGGGLM, DGGGLM, CGGGLM, and ZGGGLM. ggglm solves a general Gauss-Markov linear model (GLM) problem:

minimize || y ||_2 subject to d = A*x + B*y x

where A is an N-by-M matrix, B is an N-by-P matrix, and d is a given N-vector. It is assumed that M <= N <= M+P, and

rank(A) = M and rank( A B ) = N.

Under these assumptions, the constrained equation is always consistent, and there is a unique solution x and a minimal 2-norm solution y, which is obtained using a generalized QR factorization of the matrices (A, B) given by

A = Q*(R), B = Q*T*Z. (0)

In particular, if matrix B is square nonsingular, then the problem GLM is equivalent to the following weighted linear least squares problem

minimize || inv(B)*(d-A*x) ||_2 x

where inv(B) denotes the inverse of B.

The selection of the LAPACK routine is done during compile-time, and is determined by the type of values contained in type MatrixA. The type of values is obtained through the value_type meta-function typename value_type<MatrixA>::type. The dispatching table below illustrates to which specific routine the code path will be generated.

Table 1.124. Dispatching of ggglm

Value type of MatrixA

LAPACK routine

float

SGGGLM

double

DGGGLM

complex<float>

CGGGLM

complex<double>

ZGGGLM


Definition

Defined in header boost/numeric/bindings/lapack/driver/ggglm.hpp.

Parameters or Requirements on Types

Parameters

MatrixA

The definition of term 1

MatrixB

The definition of term 2

MatrixC

The definition of term 3.

Definitions may contain paragraphs.

Complexity
Example

#include <boost/numeric/bindings/lapack/driver/ggglm.hpp>
using namespace boost::numeric::bindings;

lapack::ggglm( x, y, z );

this will output

[5] 0 1 2 3 4 5

Notes
See Also

PrevUpHomeNext