naginterfaces.library.lapackeig.dggsvd3

naginterfaces.library.lapackeig.dggsvd3(jobu, jobv, jobq, a, b)[source]

dggsvd3 computes the generalized singular value decomposition (GSVD) of an real matrix and a real matrix .

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

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f08/f08vcf.html

Parameters
jobustr, length 1

If , the orthogonal matrix is computed.

If , is not computed.

jobvstr, length 1

If , the orthogonal matrix is computed.

If , is not computed.

jobqstr, length 1

If , the orthogonal matrix is computed.

If , is not computed.

afloat, array-like, shape

The matrix .

bfloat, array-like, shape

The matrix .

Returns
kint

and specify the dimension of the subblocks and as described in Notes; is the effective numerical rank of (A;B).

lint

and specify the dimension of the subblocks and as described in Notes; is the effective numerical rank of (A;B).

afloat, ndarray, shape

Contains the triangular matrix , or part of . See Notes for details.

bfloat, ndarray, shape

Contains the triangular matrix if . See Notes for details.

alphafloat, ndarray, shape

See the description of .

betafloat, ndarray, shape

and contain the generalized singular value pairs of and , and ;

,

,

and if ,

,

,

or if ,

,

,

,

, and

,

.

The notation above refers to consecutive elements , for .

ufloat, ndarray, shape

If , contains the orthogonal matrix .

If , is not referenced.

vfloat, ndarray, shape

If , contains the orthogonal matrix .

If , is not referenced.

qfloat, ndarray, shape

If , contains the orthogonal matrix .

If , is not referenced.

iworkint, ndarray, shape

Stores the sorting information. More precisely, if is the ordered set of indices of containing (denote as , see ), then the corresponding elements contain the swap pivots, , that sorts such that is in descending numerical order.

The following pseudocode sorts the set :

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 Jacobi-type procedure failed to converge.

Notes

Given an real matrix and a real matrix , the generalized singular value decomposition is given by

where , and are orthogonal matrices. Let be the effective numerical rank of and be the effective numerical rank of the matrix (A;B), then the first generalized singular values are infinite and the remaining are finite. is a nonsingular upper triangular matrix, and are and ‘diagonal’ matrices structured as follows:

if ,

where

and

is stored as a submatrix of with elements stored as on exit.

If ,

where

and

is stored as a submatrix of with stored as , and is stored as a submatrix of with stored as .

The function computes , , and, optionally, the orthogonal transformation matrices , and .

In particular, if is an nonsingular matrix, then the GSVD of and implicitly gives the SVD of :

If (A;B) has orthonormal columns, then the GSVD of and is also equal to the CS decomposition of and . Furthermore, the GSVD can be used to derive the solution of the eigenvalue problem:

In some literature, the GSVD of and is presented in the form

where and are orthogonal and is nonsingular, and and are ‘diagonal’. The former GSVD form can be converted to the latter form by setting

A two stage process is used to compute the GSVD of the matrix pair . The pair is first reduced to upper triangular form by orthogonal transformations using dggsvp3(). The GSVD of the resulting upper triangular matrix pair is then performed by dtgsja() which uses a variant of the Kogbetliantz algorithm (a cyclic Jacobi method).

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, 2012, Matrix Computations, (4th Edition), Johns Hopkins University Press, Baltimore