The routine may be called by the names f08mdf, nagf_lapackeig_dbdsdc or its LAPACK name dbdsdc.
3Description
f08mdf 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 routine 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 routine is available to apply or when stored in compact form.
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: – Character(1)Input
On entry: indicates whether is upper or lower bidiagonal.
is upper bidiagonal.
is lower bidiagonal.
Constraint:
or .
2: – Character(1)Input
On entry: 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.
Constraint:
, or .
3: – IntegerInput
On entry: , the order of the matrix .
Constraint:
.
4: – Real (Kind=nag_wp) arrayInput/Output
Note: the dimension of the array d
must be at least
.
On entry: the diagonal elements of the bidiagonal matrix .
On exit: if , the singular values of .
5: – Real (Kind=nag_wp) arrayInput/Output
Note: the dimension of the array e
must be at least
.
On entry: the off-diagonal elements of the bidiagonal matrix .
On entry: the first dimension of the array vt as declared in the (sub)program from which f08mdf is called.
Constraints:
if , ;
otherwise .
10: – Real (Kind=nag_wp) arrayOutput
Note: the dimension of the array q
must be at least
.
On exit: if , then if , q and iq contain the left and right singular vectors in a compact form, requiring space instead of . In particular, q contains all the real data in the first elements of q, where is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about ).
Note: the dimension of the array iq
must be at least
.
On exit: if , then if , q and iq contain the left and right singular vectors in a compact form, requiring space instead of . In particular, iq contains all integer data in the first elements of iq, where is equal to the maximum size of the subproblems at the bottom of the computation tree (usually about ).
Note: the dimension of the array work
must be at least
if , if , if , and at least otherwise.
13: – Integer arrayWorkspace
14: – IntegerOutput
On exit: unless the routine detects an error (see Section 6).
6Error Indicators and Warnings
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
The algorithm failed to compute a singular value. The update process of divide-and-conquer failed.
7Accuracy
Each computed singular value of is accurate to nearly full relative precision, no matter how tiny the singular value. The th computed singular value, , satisfies the bound
where is the machine precision and is a modest function of .
f08mdf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08mdf 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.
9Further Comments
If only singular values are required, the total number of floating-point operations is approximately proportional to . When singular vectors are required the number of operations is bounded above by approximately the same number of operations as f08mef, but for large matrices f08mdf is usually much faster.
There is no complex analogue of f08mdf.
10Example
This example computes the singular value decomposition of the upper bidiagonal matrix