The routine may be called by the names f08kff, nagf_lapackeig_dorgbr or its LAPACK name dorgbr.
f08kff is intended to be used after a call to f08kef, which reduces a real rectangular matrix to bidiagonal form by an orthogonal transformation: . f08kef 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 orthogonal matrix or is generated.
2: – IntegerInput
On entry: , the number of rows of the orthogonal matrix or to be returned.
3: – IntegerInput
On entry: , the number of columns of the orthogonal 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: – Real (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 f08kef.
On exit: the orthogonal 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 f08kff is called.
7: – Real (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 f08kef in its argument tauq if , or in its argument taup if .
8: – Real (Kind=nag_wp) arrayWorkspace
On exit: if , 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 f08kff 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 orthogonal 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.
f08kff is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08kff 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 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 bidiagonal form by f08kef. The program then calls f08kff twice to form and , and passes these matrices to f08mef, which computes the singular value decomposition of .