The routine may be called by the names f08ktf, nagf_lapackeig_zungbr or its LAPACK name zungbr.
f08ktf is intended to be used after a call to f08ksf, which reduces a complex rectangular matrix to real bidiagonal form by a unitary transformation: . f08ksf represents the matrices and as products of elementary reflectors.
This routine 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 matrix):
1.To form the full matrix :
(note that the array a must have at least columns).
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
1: – Character(1)Input
On entry: indicates whether the unitary matrix or is generated.
2: – IntegerInput
On entry: , the number of rows of the unitary matrix or to be returned.
3: – IntegerInput
On entry: , the number of columns of the unitary matrix or to be returned.
if and , ;
if and , ;
if and , ;
if and , .
4: – IntegerInput
On entry: if , the number of columns in the original matrix .
If , the number of rows in the original matrix .
5: – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array a
must be at least
On entry: details of the vectors which define the elementary reflectors, as returned by f08ksf.
On exit: the unitary matrix or , or the leading rows or columns thereof, as specified by vect, m and n.
6: – IntegerInput
On entry: the first dimension of the array a as declared in the (sub)program from which f08ktf is called.
7: – Complex (Kind=nag_wp) arrayInput
Note: the dimension of the array tau
must be at least
if and at least if .
On entry: further details of the elementary reflectors, as returned by f08ksf in its argument tauq if , or in its argument taup if .
8: – Complex (Kind=nag_wp) arrayWorkspace
On exit: if , the real part of contains the minimum value of lwork required for optimal performance.
9: – IntegerInput
On entry: the dimension of the array work as declared in the (sub)program from which f08ktf is called.
If , a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued.
for optimal performance, , where is the optimal block size.
10: – IntegerOutput
On exit: unless the routine detects an error (see Section 6).
6Error Indicators and Warnings
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
The computed matrix differs from an exactly unitary matrix by a matrix such that
where is the machine precision. A similar statement holds for the computed matrix .
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
f08ktf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08ktf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
The total number of real floating-point operations for the cases listed in Section 3 are approximately as follows:
For this routine two examples are presented, both of which involve computing the singular value decomposition of a matrix , where
in the first example and
in the second. must first be reduced to tridiagonal form by f08ksf. The program then calls f08ktf twice to form and , and passes these matrices to f08msf, which computes the singular value decomposition of .