# naginterfaces.library.lapackeig.dtgsja¶

naginterfaces.library.lapackeig.dtgsja(jobu, jobv, jobq, k, l, a, b, tola, tolb, u, v, q)[source]

dtgsja computes the generalized singular value decomposition (GSVD) of two real upper trapezoidal matrices and , where is an matrix and is a matrix.

and are assumed to be in the form returned by dggsvp3().

For full information please refer to the NAG Library document for f08ye

https://www.nag.com/numeric/nl/nagdoc_28.7/flhtml/f08/f08yef.html

Parameters
jobustr, length 1

If , must contain an orthogonal matrix on entry, and the product is returned.

If , is initialized to the unit matrix, and the orthogonal matrix is returned.

If , is not computed.

jobvstr, length 1

If , must contain an orthogonal matrix on entry, and the product is returned.

If , is initialized to the unit matrix, and the orthogonal matrix is returned.

If , is not computed.

jobqstr, length 1

If , must contain an orthogonal matrix on entry, and the product is returned.

If , is initialized to the unit matrix, and the orthogonal matrix is returned.

If , is not computed.

kint

and specify the sizes, and , of the subblocks of and , whose GSVD is to be computed by dtgsja.

lint

and specify the sizes, and , of the subblocks of and , whose GSVD is to be computed by dtgsja.

afloat, array-like, shape

The matrix .

bfloat, array-like, shape

The matrix .

tolafloat

and are the convergence criteria for the Jacobi–Kogbetliantz iteration procedure. Generally, they should be the same as used in the preprocessing step performed by dggsvp3(), say

where is the machine precision.

tolbfloat

and are the convergence criteria for the Jacobi–Kogbetliantz iteration procedure. Generally, they should be the same as used in the preprocessing step performed by dggsvp3(), say

where is the machine precision.

ufloat, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; otherwise: .

If , must contain an matrix (usually the orthogonal matrix returned by dggsvp3()).

vfloat, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; otherwise: .

If , must contain an matrix (usually the orthogonal matrix returned by dggsvp3()).

qfloat, array-like, shape

Note: the required extent for this argument in dimension 1 is determined as follows: if : ; otherwise: .

Note: the required extent for this argument in dimension 2 is determined as follows: if : ; otherwise: .

If , must contain an matrix (usually the orthogonal matrix returned by dggsvp3()).

Returns
afloat, ndarray, shape

If , contains the upper triangular matrix .

If , contains the first rows of the upper triangular matrix , and the submatrix is returned in .

bfloat, ndarray, shape

If , contains the submatrix of .

alphafloat, ndarray, shape

See the description of .

betafloat, ndarray, shape

and contain the generalized singular value pairs of and ;

, , for , and

if , , , for , or

if , , , for and , , for .

Furthermore, if , , for .

ufloat, ndarray, shape

If , contains the product .

If , contains the orthogonal matrix .

If , is not referenced.

vfloat, ndarray, shape

If , contains the orthogonal matrix .

If , contains the product .

If , is not referenced.

qfloat, ndarray, shape

If , contains the orthogonal matrix .

If , contains the product .

If , is not referenced.

ncycleint

The number of cycles required for convergence.

Raises
NagValueError
(errno )

On entry, error in parameter .

Constraint: , or .

(errno )

On entry, error in parameter .

Constraint: , or .

(errno )

On entry, error in parameter .

Constraint: , or .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

On entry, error in parameter .

Constraint: .

(errno )

The procedure does not converge after cycles.

Notes

dtgsja computes the GSVD of the matrices and which are assumed to have the form as returned by dggsvp3()

where the matrix and the matrix are nonsingular upper triangular, is upper triangular if and is upper trapezoidal otherwise.

dtgsja computes orthogonal 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 non-negative diagonal elements, the diagonal matrix has positive diagonal elements, so that is nonsingular, and . See Section 2.3.5.3 of Anderson et al. (1999) for further information.

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, https://www.netlib.org/lapack/lug

Golub, G H and Van Loan, C F, 1996, Matrix Computations, (3rd Edition), Johns Hopkins University Press, Baltimore