Contents

# ?gglse

Solves the linear equality-constrained least squares problem using a generalized RQ factorization.

## Syntax

Include Files
• mkl.h
Description
The routine solves the linear equality-constrained least squares (LSE) problem:
minimize ||
c
-
A
*
x
||
2
subject to
B
*
x
=
d
where
A
is an
m
-by-
n
matrix,
B
is a
p
-by-
n
matrix,
c
is a given
m
-vector, and
d
is a given
p
-vector. It is assumed that
p
n
m
+
p
, and These conditions ensure that the LSE problem has a unique solution, which is obtained using a generalized
RQ
factorization of the matrices
(
B
,
A
)
given by
`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 matrix
A
(
m
0
).
n
The number of columns of the matrices
A
and
B
(
n
0
).
p
The number of rows of the matrix
B
(
0
p
n
m
+
p
)
.
a
,
b
,
c
,
d
Arrays:
a
(size max(1,
lda
*
n
) for column major layout and max(1,
lda
*
m
) for row major layout)
contains the
m
-by-
n
matrix
A
.
b
(size max(1,
ldb
*
n
) for column major layout and max(1,
ldb
*
p
) for row major layout)
contains the
p
-by-
n
matrix
B
.
c
size 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
a
; at least max(1,
m
)
for column major layout and max(1,
n
) for row major layout
.
ldb
b
; 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-
n
upper trapezoidal matrix
T
as returned by
?ggrqf
.
x
The solution of the LSE problem.
b
On exit, the upper right triangle contains the
p
-by-
p
upper triangular matrix
R
as returned by
?ggrqf
.
d
On exit,
d
is destroyed.
c
On exit, the residual sum-of-squares for the solution is given by the sum of squares of elements
n
-
p
+1 to
m
of vector
c
.
Return Values
This function returns a value
info
.
If
info
=0
, the execution is successful.
If
info
=
-i
, the
i
-th parameter had an illegal value.
If
info
= 1
, the upper triangular factor
R
associated with
B
in the generalized RQ factorization of the pair
(
B
,
A
)
is singular, so that
rank(
B
) <
p
; the least squares solution could not be computed.
If
info
= 2
, the
(
n
-
p
)
-by-
(
n
-
p
)
part of the upper trapezoidal factor
T
associated with
A
in the generalized RQ factorization of the pair
(
B
,
A
)
is singular, so that ; the least squares solution could not be computed.

#### Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804