NAG Library Routine Document
F08KFF (DORGBR)
1 Purpose
F08KFF (DORGBR) generates one of the real orthogonal matrices
or
which were determined by
F08KEF (DGEBRD) when reducing a real matrix to bidiagonal form.
2 Specification
INTEGER |
M, N, K, LDA, LWORK, INFO |
REAL (KIND=nag_wp) |
A(LDA,*), TAU(*), WORK(max(1,LWORK)) |
CHARACTER(1) |
VECT |
|
The routine may be called by its
LAPACK
name dorgbr.
3 Description
F08KFF (DORGBR) is intended to be used after a call to
F08KEF (DGEBRD), which reduces a real rectangular matrix
to bidiagonal form
by an orthogonal transformation:
.
F08KEF (DGEBRD) 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 parameters
VECT,
M,
N and
K. The appropriate values to cover the most likely cases are as follows (assuming that
was an
by
matrix):
1. |
To form the full by matrix :
CALL DORGBR('Q',m,m,n,...)
(note that the array A must have at least columns).
|
2. |
If , to form the leading columns of :
CALL DORGBR('Q',m,n,n,...)
|
3. |
To form the full by matrix :
CALL DORGBR('P',n,n,m,...)
(note that the array A must have at least rows).
|
4. |
If , to form the leading rows of :
CALL DORGBR('P',m,n,m,...)
|
4 References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5 Parameters
- 1: – CHARACTER(1)Input
-
On entry: indicates whether the orthogonal matrix
or
is generated.
- is generated.
- is generated.
Constraint:
or .
- 2: – INTEGERInput
-
On entry: , the number of rows of the orthogonal matrix or to be returned.
Constraint:
.
- 3: – INTEGERInput
-
On entry: , the number of columns of the orthogonal matrix or to be returned.
Constraints:
- ;
- 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 .
Constraint:
.
- 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 (DGEBRD).
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 (DORGBR) is called.
Constraint:
.
- 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 (DGEBRD) in its parameter
TAUQ if
, or in its parameter
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 (DORGBR) 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.
Suggested value:
for optimal performance, , where is the optimal block size.
Constraint:
or .
- 10: – INTEGEROutput
On exit:
unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
-
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
7 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
.
8 Parallelism and Performance
F08KFF (DORGBR) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
F08KFF (DORGBR) 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:
1. |
To form the whole of :
- if ,
- if ;
|
2. |
To form the leading columns of when :
|
3. |
To form the whole of :
- if ,
- if ;
|
4. |
To form the leading rows of when :
|
The complex analogue of this routine is
F08KTF (ZUNGBR).
10 Example
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
F08KEF (DGEBRD). The program then calls F08KFF (DORGBR) twice to form
and
, and passes these matrices to
F08MEF (DBDSQR), which computes the singular value decomposition of
.
10.1 Program Text
Program Text (f08kffe.f90)
10.2 Program Data
Program Data (f08kffe.d)
10.3 Program Results
Program Results (f08kffe.r)