naginterfaces.library.lapackeig.dbdsdc

naginterfaces.library.lapackeig.dbdsdc(uplo, compq, d, e)[source]

dbdsdc computes the singular values and, optionally, the left and right singular vectors of a real (upper or lower) bidiagonal matrix .

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

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f08/f08mdf.html

Parameters
uplostr, length 1

Indicates whether is upper or lower bidiagonal.

is upper bidiagonal.

is lower bidiagonal.

compqstr, length 1

Specifies whether singular vectors are to be computed.

Compute singular values only.

Compute singular values and compute singular vectors in compact form.

Compute singular values and singular vectors.

dfloat, array-like, shape

The diagonal elements of the bidiagonal matrix .

efloat, array-like, shape

The off-diagonal elements of the bidiagonal matrix .

Returns
dfloat, ndarray, shape

If no exception or warning is raised, the singular values of .

uNone or float, ndarray, shape

If , then if no exception or warning is raised, contains the left singular vectors of the bidiagonal matrix .

If , is not referenced.

vtNone or float, ndarray, shape

If , then if no exception or warning is raised, the rows of contain the right singular vectors of the bidiagonal matrix .

If , is not referenced.

qNone or float, ndarray, shape

If , then if no exception or warning is raised, and contain the left and right singular vectors in a compact form, requiring space instead of . In particular, contains all the real data in the first elements of , where is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about ).

If , is not referenced.

iqNone or int, ndarray, shape

If , then if no exception or warning is raised, and contain the left and right singular vectors in a compact form, requiring space instead of . In particular, contains all integer data in the first elements of , where is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about ).

If , is not referenced.

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: .

(errno )

The algorithm failed to compute a singular value. The update process of divide-and-conquer failed.

Notes

dbdsdc computes the singular value decomposition (SVD) of the (upper or lower) bidiagonal matrix as

where is a diagonal matrix with non-negative diagonal elements , such that

and and are orthogonal matrices. The diagonal elements of are the singular values of and the columns of and are respectively the corresponding left and right singular vectors of .

When only singular values are required the function uses the algorithm, but when singular vectors are required a divide and conquer method is used. The singular values can optionally be returned in compact form, although currently no function is available to apply or when stored in compact form.

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