f08ysc computes the generalized singular value decomposition (GSVD) of two complex upper trapezoidal matrices and , where is an matrix and is a matrix.
and are assumed to be in the form returned by f08vuc.
The function may be called by the names: f08ysc, nag_lapackeig_ztgsja or nag_ztgsja.
3Description
f08ysc computes the GSVD of the matrices and which are assumed to have the form as returned by f08vuc
where the matrix and the matrix are nonsingular upper triangular, is upper triangular if and is upper trapezoidal otherwise.
f08ysc 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.
4References
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 https://www.netlib.org/lapack/lug
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5Arguments
1: – Nag_OrderTypeInput
On entry: the order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by . See Section 3.1.3 in the Introduction to the NAG Library CL Interface for a more detailed explanation of the use of this argument.
Constraint:
or .
2: – Nag_ComputeUTypeInput
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 .
3: – Nag_ComputeVTypeInput
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 .
4: – Nag_ComputeQTypeInput
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 .
5: – IntegerInput
On entry: , the number of rows of the matrix .
Constraint:
.
6: – IntegerInput
On entry: , the number of rows of the matrix .
Constraint:
.
7: – IntegerInput
On entry: , the number of columns of the matrices and .
Constraint:
.
8: – IntegerInput
9: – IntegerInput
On entry: k and l specify the sizes, and , of the subblocks of and , whose GSVD is to be computed by f08ysc.
10: – ComplexInput/Output
Note: the dimension, dim, of the array a
must be at least
when
;
when
.
where appears in this document, it refers to the array element
when ;
when .
On entry: the matrix .
On exit: if , contains the upper triangular matrix .
If , contains the first rows of the upper triangular matrix , and the submatrix is returned in .
11: – IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array a.
Constraints:
if ,
;
if , .
12: – ComplexInput/Output
Note: the dimension, dim, of the array b
must be at least
when
;
when
.
where appears in this document, it refers to the array element
when ;
when .
On entry: the matrix .
On exit: if , contains the submatrix of .
13: – IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array b.
Constraints:
if ,
;
if , .
14: – doubleInput
15: – doubleInput
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 f08vuc, say
On entry: the stride separating row or column elements (depending on the value of order) in the array q.
Constraints:
if or , ;
otherwise .
24: – Integer *Output
On exit: the number of cycles required for convergence.
25: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
NE_BAD_PARAM
On entry, argument had an illegal value.
NE_CONVERGENCE
The procedure does not converge after cycles.
NE_ENUM_INT_2
On entry, , and .
Constraint: if or , ;
otherwise .
On entry, , and .
Constraint: if or , ;
otherwise .
On entry, , and .
Constraint: if or , ;
otherwise .
NE_INT
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, .
Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
On entry, . Constraint: .
NE_INT_2
On entry, and .
Constraint: .
On entry, and .
Constraint: .
On entry, and .
Constraint: .
On entry, and .
Constraint: .
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.
7Accuracy
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.
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
f08ysc 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 function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.