|
NAG[f08afc] NAG[nag_dorgqr] - Form all or part of orthogonal from factorization determined by f08aec (nag_dgeqrf) or f08bec (nag_dgeqpf)
|
|
Calling Sequence
f08afc(k, a, tau, 'm'=m, 'n'=n, 'fail'=fail)
nag_dorgqr(. . .)
Parameters
|
k - integer;
|
|
|
On entry: , the number of elementary reflectors whose product defines the matrix .
|
|
Constraint: . .
|
|
|
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 .
|
|
|
'm'=m - integer; (optional)
|
|
|
Default value: the first dimension of the array a.
|
|
On entry: , the order of the orthogonal matrix .
|
|
Constraint: . .
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the second dimension of the array a.
|
|
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_dorgqr (f08afc) 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 generate explicitly as a square matrix, or to form only its leading columns.
Usually is determined from the factorization of an by matrix with . The whole of may be computed by:
nag_dorgqr (p,a,tau,'m'=m,'n'=m)
(note that the array a must have at least columns) or its leading columns by:
nag_dorgqr (p,a,tau,'m'=m,'n'=p)
The columns of returned by the last call form an orthonormal basis for the space spanned by the columns of ; thus f08aec (nag_dgeqrf) followed by nag_dorgqr (f08afc) can be used to orthogonalise the columns of .
The information returned by the factorization functions also yields the factorization of the leading columns of , where . The orthogonal matrix arising from this factorization can be computed by:
nag_dorgqr (k,a,tau,'m'=m,'n'=m)
or its leading columns by:
nag_dorgqr (k,a,tau,'m'=m,'n'=k)
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . Constraint: .
On entry, . Constraint: .
"NE_INT_2"
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 matrix differs from an exactly orthogonal matrix by a matrix such that
where is the machine precision.
|
|
Further Comments
|
|
The total number of floating-point operations is approximately ; when , the number is approximately .
The complex analogue of this function is f08atc (nag_zungqr).
|
|
|
Examples
|
|
>
|
m := 6:
n := 4:
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]):
NAG:-f08afc(k, a, tau, 'm' = m, 'n' = n):
|
|
|