?gglse
?gglse
Solves the linear equality-constrained least squares problem using a generalized RQ factorization.
Syntax
lapack_int
LAPACKE_sgglse
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
lapack_int
p
,
float
*
a
,
lapack_int
lda
,
float
*
b
,
lapack_int
ldb
,
float
*
c
,
float
*
d
,
float
*
x
);
lapack_int
LAPACKE_dgglse
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
lapack_int
p
,
double
*
a
,
lapack_int
lda
,
double
*
b
,
lapack_int
ldb
,
double
*
c
,
double
*
d
,
double
*
x
);
lapack_int
LAPACKE_cgglse
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
lapack_int
p
,
lapack_complex_float
*
a
,
lapack_int
lda
,
lapack_complex_float
*
b
,
lapack_int
ldb
,
lapack_complex_float
*
c
,
lapack_complex_float
*
d
,
lapack_complex_float
*
x
);
lapack_int
LAPACKE_zgglse
(
int
matrix_layout
,
lapack_int
m
,
lapack_int
n
,
lapack_int
p
,
lapack_complex_double
*
a
,
lapack_int
lda
,
lapack_complex_double
*
b
,
lapack_int
ldb
,
lapack_complex_double
*
c
,
lapack_complex_double
*
d
,
lapack_complex_double
*
x
);
Include Files
- mkl.h
Description
The routine solves the linear equality-constrained least squares (LSE) problem:
minimize ||
subject to c
- A
*x
||2
B
*x
= d
where , and
A
is an m
-by-n
matrix, B
is a p
-by-n
matrix, c
is a given m
-vector, andd
is a given p
-vector. It is assumed that p
≤
n
≤
m
+p

These conditions ensure that the LSE problem has a unique solution, which is obtained using a generalized
RQ
factorization of the matrices (
given byB
, A
)B=(0 R)*Q, A=Z*T*Q
Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- m
- The number of rows of the matrixA().m≥0
- n
- The number of columns of the matricesAandB().n≥0
- p
- The number of rows of the matrixB(0.≤p≤n≤m+p)
- a,b,c,d
- Arrays:a(size max(1,contains thelda*n) for column major layout and max(1,lda*m) for row major layout)m-by-nmatrixA.b(size max(1,contains theldb*n) for column major layout and max(1,ldb*p) for row major layout)p-by-nmatrixB.csize at least max(1,m), contains the right hand side vector for the least squares part of the LSE problem.d, size at least max(1,p), contains the right hand side vector for the constrained equation.
- lda
- The leading dimension ofa; at least max(1,m)for column major layout and max(1,.n) for row major layout
- ldb
- The leading dimension ofb; at least max(1,p)for column major layout and max(1,.n) for row major layout
Output Parameters
- a
- The elements on and above the diagonal contain the min(m,n)-by-nupper trapezoidal matrixTas returned by?ggrqf.
- x
- The solution of the LSE problem.
- b
- On exit, the upper right triangle contains thep-by-pupper triangular matrixRas returned by?ggrqf.
- d
- On exit,dis destroyed.
- c
- On exit, the residual sum-of-squares for the solution is given by the sum of squares of elementsn-p+1 tomof vectorc.
Return Values
This function returns a value
info
.If , the execution is successful.
info
=0If , the
info
= -i
i
-th parameter had an illegal value.If , the upper triangular factor
info
= 1R
associated with B
in the generalized RQ factorization of the pair (
is singular, so that B
, A
)rank(
; the least squares solution could not be computed.B
) < p
If , the part of the upper trapezoidal factor
; the least squares solution could not be computed.
info
= 2(
-by-n
-p
)(
n
-p
)T
associated with A
in the generalized RQ factorization of the pair (
is singular, so that
B
, A
)