|
NAG[f08agc] NAG[nag_dormqr] - Apply orthogonal transformation determined by f08aec (nag_dgeqrf) or f08bec (nag_dgeqpf)
|
|
Calling Sequence
f08agc(side, trans, k, a, tau, c, 'm'=m, 'n'=n, 'fail'=fail)
nag_dormqr(. . .)
Parameters
|
side - String;
|
|
|
Constraint: "Nag_LeftSide" or "Nag_RightSide". .
|
|
|
trans - String;
|
|
|
Constraint: "Nag_NoTrans" or "Nag_Trans". .
|
|
|
k - integer;
|
|
|
On entry: , the number of elementary reflectors whose product defines the matrix .
|
|
if , ;
|
|
if , .
|
|
|
a - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
tau - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array tau must be at least .
|
|
|
c - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
'm'=m - integer; (optional)
|
|
|
Default value: the first dimension of the array c.
|
|
On entry: , the number of rows of the matrix .
|
|
Constraint: . .
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the second dimension of the array c.
|
|
On entry: , the number of columns of the matrix .
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Description
|
|
nag_dormqr (f08agc) is intended to be used after a call to f08aec (nag_dgeqrf) or f08bec (nag_dgeqpf), which perform a factorization of a real matrix . The orthogonal matrix is represented as a product of elementary reflectors.
This function may be used to form one of the matrix products
overwriting the result on (which may be any real rectangular matrix).
A common application of this function is in solving linear least-squares problems, as described in the f08 Chapter Introduction and illustrated in Section [Example] of the document for f08aec (nag_dgeqrf).
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_ENUM_INT_3"
On entry, , , , . Constraint: if , .
On entry, , , , . Constraint: if , .
"NE_INT"
On entry, . Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
|
|
Accuracy
|
|
The computed result differs from the exact result by a matrix such that
where is the machine precision.
|
|
Further Comments
|
|
The total number of floating-point operations is approximately if and if .
The complex analogue of this function is f08auc (nag_zunmqr).
|
|
|
Examples
|
|
>
|
side := "Nag_LeftSide":
trans := "Nag_Trans":
m := 6:
n := 2:
k := 4:
a := Matrix([[3.617678813825241, -0.5565999923223894, 0.847366545721238, 0.7460032078266114], [0.4608758421558694, -2.028077032202356, 0.5513872350020939, 1.16996276895585], [-0.5492302782168391, -0.04571098289280236, 1.374460641222295, -1.410473781059997], [0.4608758421558694, 0.2828431690617352, 0.004430814804361756, -2.375527319588618], [-0.03581936597066342, 0.0796426824688576, -0.07728561757441146, -0.5213744847432364], [0.004775915462755124, 0.3002942085609617, 0.8016653555722278, 0.2558113872182323]], datatype=float[8]):
tau := Vector([1.157559592582321, 1.696915139470381, 1.213106371299621, 1.495583371241627], datatype=float[8]):
c := Matrix([[-3.15, 2.19], [-0.11, -3.64], [1.99, 0.57], [-2.7, 8.23], [0.26, -6.35], [4.5, -1.48]], datatype=float[8]):
NAG:-f08agc(side, trans, k, a, tau, c, 'm' = m, 'n' = n):
|
|
|