NAG FL Interface
f01rjf (complex_gen_rq)
1
Purpose
f01rjf finds the factorization of the complex by (), matrix , so that is reduced to upper triangular form by means of unitary transformations from the right.
2
Specification
Fortran Interface
Integer, Intent (In) |
:: |
m, n, lda |
Integer, Intent (Inout) |
:: |
ifail |
Complex (Kind=nag_wp), Intent (Inout) |
:: |
a(lda,*) |
Complex (Kind=nag_wp), Intent (Out) |
:: |
theta(m) |
|
C Header Interface
#include <nag.h>
void |
f01rjf_ (const Integer *m, const Integer *n, Complex a[], const Integer *lda, Complex theta[], Integer *ifail) |
|
C++ Header Interface
#include <nag.h> extern "C" {
void |
f01rjf_ (const Integer &m, const Integer &n, Complex a[], const Integer &lda, Complex theta[], Integer &ifail) |
}
|
The routine may be called by the names f01rjf or nagf_matop_complex_gen_rq.
3
Description
The
by
matrix
is factorized as
where
is an
by
unitary matrix and
is an
by
upper triangular matrix.
is given as a sequence of Householder transformation matrices
the
th transformation matrix,
, being used to introduce zeros into the
th row of
.
has the form
where
is a scalar for which
,
is a real scalar,
is a
element vector and
is an
element vector.
and
are chosen to annihilate the elements in the
th row of
.
The scalar
and the vector
are returned in the
th element of
theta and in the
th row of
a, such that
, given by
is in
, the elements of
are in
and the elements of
are in
. The elements of
are returned in the upper triangular part of
a.
4
References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Wilkinson J H (1965) The Algebraic Eigenvalue Problem Oxford University Press, Oxford
5
Arguments
-
1:
– Integer
Input
-
On entry:
, the number of rows of the matrix
.
When then an immediate return is effected.
Constraint:
.
-
2:
– Integer
Input
-
On entry: , the number of columns of the matrix .
Constraint:
.
-
3:
– Complex (Kind=nag_wp) array
Input/Output
-
Note: the second dimension of the array
a
must be at least
.
On entry: the leading
by
part of the array
a must contain the matrix to be factorized.
On exit: the
by
upper triangular part of
a will contain the upper triangular matrix
, and the
by
strictly lower triangular part of
a and the
by
rectangular part of
a to the right of the upper triangular part will contain details of the factorization as described in
Section 3.
-
4:
– Integer
Input
-
On entry: the first dimension of the array
a as declared in the (sub)program from which
f01rjf is called.
Constraint:
.
-
5:
– Complex (Kind=nag_wp) array
Output
-
On exit:
contains the scalar
for the
th transformation. If
then
; if
then
, otherwise
contains
as described in
Section 3 and
is always in the range
.
-
6:
– Integer
Input/Output
-
On entry:
ifail must be set to
,
or
to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value
or
is recommended. If message printing is undesirable, then the value
is recommended. Otherwise, the value
is recommended.
When the value or is used it is essential to test the value of ifail on exit.
On exit:
unless the routine detects an error or a warning has been flagged (see
Section 6).
6
Error Indicators and Warnings
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Errors or warnings detected by the routine:
-
On entry, and .
Constraint: .
On entry, .
Constraint: .
On entry, and .
Constraint: .
An unexpected error has been triggered by this routine. Please
contact
NAG.
See
Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See
Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See
Section 9 in the Introduction to the NAG Library FL Interface for further information.
7
Accuracy
The computed factors
and
satisfy the relation
where
is the
machine precision (see
x02ajf),
is a modest function of
and
, and
denotes the spectral (two) norm.
8
Parallelism and Performance
f01rjf 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 approximate number of floating-point operations is given by .
The first
rows of the unitary matrix
can be obtained by calling
f01rkf, which overwrites the
rows of
on the first
rows of the array
a.
is obtained by the call:
ifail = 0
Call f01rkf('Separate',m,n,k,a,lda,theta,work,ifail)
must be a
element array. If
is larger than
, then
a must have been declared to have at least
rows.
Operations involving the matrix
can readily be performed by the Level 2 BLAS routines
f06sff and
f06sjf, (see
Chapter F06), but note that no test for near singularity of
is incorporated into
f06sff. If
is singular, or nearly singular then
f02xuf can be used to determine the singular value decomposition of
.
10
Example
This example obtains the
factorization of the
by
matrix
10.1
Program Text
10.2
Program Data
10.3
Program Results