|
NAG[f08kfc] NAG[nag_dorgbr] - Generate orthogonal transformation matrices from reduction to bidiagonal form determined by f08kec (nag_dgebrd)
|
|
Calling Sequence
f08kfc(vect, k, a, tau, 'm'=m, 'n'=n, 'fail'=fail)
nag_dorgbr(. . .)
Parameters
|
k - integer;
|
|
|
On entry: if , the number of columns in the original matrix .
|
|
If , the number of rows in the original 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.
|
|
On entry: details of the vectors which define the elementary reflectors, as returned by f08kec (nag_dgebrd).
|
|
On exit: the orthogonal matrix or , or the leading rows or columns thereof, as specified by vect, m and n.
|
|
|
tau - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array tau must be at least
|
|
when ;
|
|
when .
|
|
On entry: further details of the elementary reflectors, as returned by f08kec (nag_dgebrd) in its argument tauq if , or in its argument taup if .
|
|
|
'm'=m - integer; (optional)
|
|
|
Default value: the first dimension of the array a.
|
|
Constraint: . .
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the second dimension of the array a.
|
|
.
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_dorgbr (f08kfc) generates one of the real orthogonal matrices or which were determined by f08kec (nag_dgebrd) when reducing a real matrix to bidiagonal form.
|
|
Description
|
|
nag_dorgbr (f08kfc) is intended to be used after a call to f08kec (nag_dgebrd), which reduces a real rectangular matrix to bidiagonal form by an orthogonal transformation: . f08kec (nag_dgebrd) represents the matrices and as products of elementary reflectors.
This function may be used to generate or explicitly as square matrices, or in some cases just the leading columns of or the leading rows of .
The various possibilities are specified by the arguments vect, m, n and k. The appropriate values to cover the most likely cases are as follows (assuming that was an by matrix):
nag_dorgbr ("Nag_FormQ",...)
|
(note that the array a must have at least columns).
|
nag_dorgbr ("Nag_FormQ",...)
nag_dorgbr ("Nag_FormP",...)
|
(note that the array a must have at least rows).
|
nag_dorgbr ("Nag_FormP",m,...)
|
|
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 and , .
On entry, , , , . Constraint: if and , .
On entry, , , , . Constraint: if and , .
On entry, , , , . Constraint: if and , .
On entry, , , , . Constraint: and
"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 matrix differs from an exactly orthogonal matrix by a matrix such that
where is the machine precision. A similar statement holds for the computed matrix .
|
|
Further Comments
|
|
The total number of floating-point operations for the cases listed in Section [Description] are approximately as follows:
|
To form the whole of :
|
|
if ,
|
|
if ;
|
|
;
|
|
To form the whole of :
|
|
if ,
|
|
if ;
|
|
.
|
The complex analogue of this function is f08ktc (nag_zungbr).
|
|
|
Examples
|
|
>
|
vect := "Nag_FormP":
m := 4:
n := 4:
k := 6:
a := Matrix([[3.617678813825241, 1.258711404710556, -0.4667885339706592, -0.4109505449290541], [0, 2.416055340423326, 1.526154889941117, -0.2094556505641233], [0, 0, -1.921310963709999, -1.18946667701939], [0, 0, 0, -1.42650154173086]], datatype=float[8]):
tau := Vector([1.442198259457561, 1.915944323746201, 0, 0], datatype=float[8]):
NAG:-f08kfc(vect, k, a, tau, 'm' = m, 'n' = n):
|
|
|