|
NAG[f08atc] NAG[nag_zungqr] - Form all or part of unitary from factorization determined by f08asc (nag_zgeqrf) or f08bsc (nag_zgeqpf)
|
|
Calling Sequence
f08atc(k, a, tau, 'm'=m, 'n'=n, 'fail'=fail)
nag_zungqr(. . .)
Parameters
|
k - integer;
|
|
|
On entry: , the number of elementary reflectors whose product defines the matrix .
|
|
Constraint: . .
|
|
|
a - Matrix(1..dim1, 1..dim2, datatype=complex[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=complex[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 unitary 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_zungqr (f08atc) is intended to be used after a call to f08asc (nag_zgeqrf) or f08bsc (nag_zgeqpf), which perform a factorization of a complex matrix . The unitary 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_zungqr (p,a,tau,'m'=m,'n'=m)
(note that the array a must have at least columns) or its leading columns by:
nag_zungqr (m,p,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 f08asc (nag_zgeqrf) followed by nag_zungqr (f08atc) 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 unitary matrix arising from this factorization can be computed by:
nag_zungqr (k,a,tau,'m'=m,'n'=m)
or its leading columns by:
nag_zungqr (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 unitary matrix by a matrix such that
where is the machine precision.
|
|
Further Comments
|
|
The total number of real floating-point operations is approximately ; when , the number is approximately .
The real analogue of this function is f08afc (nag_dorgqr).
|
|
|
Examples
|
|
>
|
m := 6:
n := 4:
k := 4:
a := Matrix([[-3.087005021051958 +0*I , -0.4884993674179769 -1.141689105124614*I , 0.3773560431732104 -1.243729755480491*I , -0.855165437696762 -0.7073198731811355*I ], [-0.3269784311233421 +0.4238066080640212*I , 1.516316047290932 +0*I , 1.373055096626978 -0.8176293354211587*I , -0.2508627202628477 +0.8203486040451442*I ], [0.1691724764304651 -0.07980476733072399*I , -0.4537104861498297 -0.006491499591352986*I , -2.171345362557171 +0*I , -0.2272676203283601 -0.2957314059070641*I ], [-0.105973629513028 +0.0726861860966964*I , -0.2734071741396469 +0.09780788387043483*I , -0.291822737804996 +0.4888081441553062*I , -2.35337610655542 +0*I ], [0.1729396325459322 +0.1606326404292986*I , -0.3236304714632618 +0.1230007002199739*I , 0.2727685061644792 +0.04697693306903758*I , 0.7054226886031557 +0.251508056610989*I ], [0.2698996744687472 -0.01516708364852969*I , -0.1645935439354585 +0.3389007203482613*I , 0.5348395253617789 +0.3988290677840222*I , 0.2703069905230761 -0.07268783264065713*I ]], datatype=complex[8]):
tau := Vector([1.310981029656006 -0.2623902437722555*I, 1.105103989110574 -0.4503625387450181*I, 1.040251871615519 +0.2121758107261096*I, 1.18595901116611 +0.2011836003307437*I], datatype=complex[8]):
NAG:-f08atc(k, a, tau, 'm' = m, 'n' = n):
|

|
|