NAG Library Routine Document
f08ysf
(ztgsja)
1
Purpose
f08ysf (ztgsja) computes the generalized singular value decomposition (GSVD) of two complex upper trapezoidal matrices and , where is an by matrix and is a by matrix.
and
are assumed to be in the form returned by
f08vsf (zggsvp) or
f08vuf (zggsvp3).
2
Specification
Fortran Interface
Subroutine f08ysf ( |
jobu,
jobv,
jobq,
m,
p,
n,
k,
l,
a,
lda,
b,
ldb,
tola,
tolb,
alpha,
beta,
u,
ldu,
v,
ldv,
q,
ldq,
work,
ncycle,
info) |
Integer, Intent (In) | :: |
m,
p,
n,
k,
l,
lda,
ldb,
ldu,
ldv,
ldq | Integer, Intent (Out) | :: |
ncycle,
info | Real (Kind=nag_wp), Intent (In) | :: |
tola,
tolb | Real (Kind=nag_wp), Intent (Out) | :: |
alpha(n),
beta(n) | Complex (Kind=nag_wp), Intent (Inout) | :: |
a(lda,*),
b(ldb,*),
u(ldu,*),
v(ldv,*),
q(ldq,*) | Complex (Kind=nag_wp), Intent (Out) | :: |
work(2*n) | Character (1), Intent (In) | :: |
jobu,
jobv,
jobq |
|
C Header Interface
#include nagmk26.h
void |
f08ysf_ (
const char *jobu,
const char *jobv,
const char *jobq,
const Integer *m,
const Integer *p,
const Integer *n,
const Integer *k,
const Integer *l,
Complex a[],
const Integer *lda,
Complex b[],
const Integer *ldb,
const double *tola,
const double *tolb,
double alpha[],
double beta[],
Complex u[],
const Integer *ldu,
Complex v[],
const Integer *ldv,
Complex q[],
const Integer *ldq,
Complex work[],
Integer *ncycle,
Integer *info,
const Charlen length_jobu,
const Charlen length_jobv,
const Charlen length_jobq) |
|
The routine may be called by its
LAPACK
name ztgsja.
3
Description
f08ysf (ztgsja) computes the GSVD of the matrices
and
which are assumed to have the form as returned by
f08vsf (zggsvp) or
f08vuf (zggsvp3)
where the
by
matrix
and the
by
matrix
are nonsingular upper triangular,
is
by
upper triangular if
and is
by
upper trapezoidal otherwise.
f08ysf (ztgsja) computes unitary matrices
,
and
, diagonal matrices
and
, and an upper triangular matrix
such that
Optionally , and may or may not be computed, or they may be premultiplied by matrices , and respectively.
If
then
,
and
have the form
where
.
If
then
,
and
have the form
where
.
In both cases the diagonal matrix
has real non-negative diagonal elements, the diagonal matrix
has real positive diagonal elements, so that
is nonsingular, and
. See Section 2.3.5.3 of
Anderson et al. (1999) for further information.
4
References
Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999)
LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia
http://www.netlib.org/lapack/lug
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: if
,
u must contain a unitary matrix
on entry, and the product
is returned.
If
,
u is initialized to the unit matrix, and the unitary matrix
is returned.
If , is not computed.
Constraint:
, or .
- 2: – Character(1)Input
-
On entry: if
,
v must contain a unitary matrix
on entry, and the product
is returned.
If
,
v is initialized to the unit matrix, and the unitary matrix
is returned.
If , is not computed.
Constraint:
, or .
- 3: – Character(1)Input
-
On entry: if
,
q must contain a unitary matrix
on entry, and the product
is returned.
If
,
q is initialized to the unit matrix, and the unitary matrix
is returned.
If , is not computed.
Constraint:
, or .
- 4: – IntegerInput
-
On entry: , the number of rows of the matrix .
Constraint:
.
- 5: – IntegerInput
-
On entry: , the number of rows of the matrix .
Constraint:
.
- 6: – IntegerInput
-
On entry: , the number of columns of the matrices and .
Constraint:
.
- 7: – IntegerInput
- 8: – IntegerInput
-
On entry:
k and
l specify the sizes,
and
, of the subblocks of
and
, whose GSVD is to be computed by
f08ysf (ztgsja).
- 9: – Complex (Kind=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
a
must be at least
.
On entry: the by matrix .
On exit: if
,
contains the
by
upper triangular matrix
.
If , contains the first rows of the by upper triangular matrix , and the submatrix is returned in .
- 10: – IntegerInput
-
On entry: the first dimension of the array
a as declared in the (sub)program from which
f08ysf (ztgsja) is called.
Constraint:
.
- 11: – Complex (Kind=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
b
must be at least
.
On entry: the by matrix .
On exit: if , contains the submatrix of .
- 12: – IntegerInput
-
On entry: the first dimension of the array
b as declared in the (sub)program from which
f08ysf (ztgsja) is called.
Constraint:
.
- 13: – Real (Kind=nag_wp)Input
- 14: – Real (Kind=nag_wp)Input
-
On entry:
tola and
tolb are the convergence criteria for the Jacobi–Kogbetliantz iteration procedure. Generally, they should be the same as used in the preprocessing step performed by
f08vsf (zggsvp) or
f08vuf (zggsvp3), say
where
is the
machine precision.
- 15: – Real (Kind=nag_wp) arrayOutput
-
On exit: see the description of
beta.
- 16: – Real (Kind=nag_wp) arrayOutput
-
On exit:
alpha and
beta contain the generalized singular value pairs of
and
;
- , , for , and
- if ,
, , for , or
- if ,
, , for and
, , for .
Furthermore, if ,
, for .
- 17: – Complex (Kind=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
u
must be at least
if
or
, and at least
otherwise.
On entry: if
,
u must contain an
by
matrix
(usually the unitary matrix returned by
f08vsf (zggsvp) or
f08vuf (zggsvp3)).
On exit: if
,
u contains the product
.
If
,
u contains the unitary matrix
.
If
,
u is not referenced.
- 18: – IntegerInput
-
On entry: the first dimension of the array
u as declared in the (sub)program from which
f08ysf (ztgsja) is called.
Constraints:
- if or , ;
- otherwise .
- 19: – Complex (Kind=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
v
must be at least
if
or
, and at least
otherwise.
On entry: if
,
v must contain an
by
matrix
(usually the unitary matrix returned by
f08vsf (zggsvp) or
f08vuf (zggsvp3)).
On exit: if
,
v contains the unitary matrix
.
If
,
v contains the product
.
If
,
v is not referenced.
- 20: – IntegerInput
-
On entry: the first dimension of the array
v as declared in the (sub)program from which
f08ysf (ztgsja) is called.
Constraints:
- if or , ;
- otherwise .
- 21: – Complex (Kind=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
q
must be at least
if
or
, and at least
otherwise.
On entry: if
,
q must contain an
by
matrix
(usually the unitary matrix returned by
f08vsf (zggsvp) or
f08vuf (zggsvp3)).
On exit: if
,
q contains the unitary matrix
.
If
,
q contains the product
.
If
,
q is not referenced.
- 22: – IntegerInput
-
On entry: the first dimension of the array
q as declared in the (sub)program from which
f08ysf (ztgsja) is called.
Constraints:
- if or , ;
- otherwise .
- 23: – Complex (Kind=nag_wp) arrayWorkspace
-
- 24: – IntegerOutput
-
On exit: the number of cycles required for convergence.
- 25: – 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.
-
The procedure does not converge after cycles.
7
Accuracy
The computed generalized singular value decomposition is nearly the exact generalized singular value decomposition for nearby matrices
and
, where
and
is the
machine precision. See Section 4.12 of
Anderson et al. (1999) for further details.
8
Parallelism and Performance
f08ysf (ztgsja) 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 real analogue of this routine is
f08yef (dtgsja).
10
Example
This example finds the generalized singular value decomposition
of the matrix pair
, where
and
10.1
Program Text
Program Text (f08ysfe.f90)
10.2
Program Data
Program Data (f08ysfe.d)
10.3
Program Results
Program Results (f08ysfe.r)