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
Fortran Interface
Integer, Intent (In) | :: |
m,
n,
k,
lda,
lwork | Integer, Intent (Out) | :: |
info | Real (Kind=nag_wp), Intent (In) | :: |
tau(*) | Real (Kind=nag_wp), Intent (Inout) | :: |
a(lda,*) | Real (Kind=nag_wp), Intent (Out) | :: |
work(max(1,lwork)) | Character (1), Intent (In) | :: |
vect |
|
C Header Interface
#include nagmk26.h
void |
f08kff_ (
const char *vect,
const Integer *m,
const Integer *n,
const Integer *k,
double a[],
const Integer *lda,
const double tau[],
double work[],
const Integer *lwork,
Integer *info,
const Charlen length_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 arguments
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
Arguments
- 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 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 (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)