There is one prototype of gels
available, please see below.
gels( MatrixA& a, MatrixB& b );
gels
(short for $FRIENDLY_NAME)
provides a C++ interface to LAPACK routines SGELS, DGELS, CGELS, and
ZGELS. gels
solves overdetermined
or underdetermined complex linear systems involving an M-by-N matrix
A, or its conjugate-transpose, using a QR or LQ factorization of A. It
is assumed that A has full rank.
The following options are provided:
1. If TRANS = 'N' and m >= n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A*X ||.
2. If TRANS = 'N' and m < n: find the minimum norm solution of an underdetermined system A * X = B.
3. If TRANS = 'C' and m >= n: find the minimum norm solution of an undetermined system A**H * X = B.
4. If TRANS = 'C' and m < n: find the least squares solution of an overdetermined system, i.e., solve the least squares problem minimize || B - A**H * X ||.
Several right hand side vectors b and solution vectors x can be handled in a single call; they are stored as the columns of the M-by-NRHS right hand side matrix B and the N-by-NRHS solution matrix X.
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.181. Dispatching of gels
Value type of MatrixA |
LAPACK routine |
---|---|
|
SGELS |
|
DGELS |
|
CGELS |
|
ZGELS |
Defined in header boost/numeric/bindings/lapack/driver/gels.hpp
.
Parameters
The definition of term 1
The definition of term 2
The definition of term 3.
Definitions may contain paragraphs.
#include <boost/numeric/bindings/lapack/driver/gels.hpp> using namespace boost::numeric::bindings; lapack::gels( x, y, z );
this will output
[5] 0 1 2 3 4 5