|
NAG[f08awc] NAG[nag_zunglq] - Form all or part of unitary from factorization determined by f08avc (nag_zgelqf)
|
|
Calling Sequence
f08awc(k, a, tau, 'm'=m, 'n'=n, 'fail'=fail)
nag_zunglq(. . .)
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.
|
|
On entry: details of the vectors which define the elementary reflectors, as returned by f08avc (nag_zgelqf).
|
|
|
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 number of rows of the 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
|
|
|
Purpose
|
|
nag_zunglq (f08awc) generates all or part of the complex unitary matrix from an factorization computed by f08avc (nag_zgelqf).
|
|
Description
|
|
nag_zunglq (f08awc) is intended to be used after a call to f08avc (nag_zgelqf), which performs an 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 rows.
Usually is determined from the factorization of a by matrix with . The whole of may be computed by:
nag_zunglq (p,a,tau,'m'=n,'n'=n)
(note that the array a must have at least rows) or its leading rows by:
nag_zunglq (p,a,tau,'m'=p,'n'=n)
The rows of returned by the last call form an orthonormal basis for the space spanned by the rows of ; thus f08avc (nag_zgelqf) followed by nag_zunglq (f08awc) can be used to orthogonalise the rows of .
The information returned by the factorization functions also yields the factorization of the leading rows of , where . The unitary matrix arising from this factorization can be computed by:
nag_zunglq (k,a,tau,'m'=n,'n'=n)
or its leading rows by:
nag_zunglq (k,a,tau,'m'=k,'n'=n)
|
|
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 f08ajc (nag_dorglq).
|
|
|
Examples
|
|
>
|
m := 3:
n := 4:
k := 3:
a := Matrix([[-2.225511177235469 -0*I , 0.2438442594612761 -0.3082069932914802*I , -0.2741364985191491 -0.230966496866882*I , 0.5807709514701289 +0.3468663602164287*I ], [0.8207552577961005 +1.238457046719376*I , 1.688100989346069 -0*I , -0.1936415258449461 +0.5429517855236941*I , 0.2789084851242076 -0.2203175797458332*I ], [0.001033470433007241 -0.6822252862760427*I , 0.774751330164006 -0.6154727158531147*I , -1.590258250459319 -0*I , -0.1267668516113225 +0.1109845202357172*I ]], datatype=complex[8]):
tau := Vector([1.12581379184436 +0.1617605895141772*I, 1.099053669168954 +0.5468590598466785*I, 1.132925657311579 -0.9590540478961487*I], datatype=complex[8]):
NAG:-f08awc(k, a, tau, 'm' = m, 'n' = n):
|

|
|