1DBDSDC(1) LAPACK routine (version 3.2) DBDSDC(1)
2
3
4
6 DBDSDC - computes the singular value decomposition (SVD) of a real N-
7 by-N (upper or lower) bidiagonal matrix B
8
10 SUBROUTINE DBDSDC( UPLO, COMPQ, N, D, E, U, LDU, VT, LDVT, Q, IQ, WORK,
11 IWORK, INFO )
12
13 CHARACTER COMPQ, UPLO
14
15 INTEGER INFO, LDU, LDVT, N
16
17 INTEGER IQ( * ), IWORK( * )
18
19 DOUBLE PRECISION D( * ), E( * ), Q( * ), U( LDU, * ), VT(
20 LDVT, * ), WORK( * )
21
23 DBDSDC computes the singular value decomposition (SVD) of a real N-by-N
24 (upper or lower) bidiagonal matrix B: B = U * S * VT, using a divide
25 and conquer method, where S is a diagonal matrix with non-negative
26 diagonal elements (the singular values of B), and U and VT are orthogo‐
27 nal matrices of left and right singular vectors, respectively. DBDSDC
28 can be used to compute all singular values, and optionally, singular
29 vectors or singular vectors in compact form. This code makes very mild
30 assumptions about floating point arithmetic. It will work on machines
31 with a guard digit in add/subtract, or on those binary machines without
32 guard digits which subtract like the Cray X-MP, Cray Y-MP, Cray C-90,
33 or Cray-2. It could conceivably fail on hexadecimal or decimal
34 machines without guard digits, but we know of none. See DLASD3 for
35 details. The code currently calls DLASDQ if singular values only are
36 desired. However, it can be slightly modified to compute singular val‐
37 ues using the divide and conquer method.
38
40 UPLO (input) CHARACTER*1
41 = 'U': B is upper bidiagonal.
42 = 'L': B is lower bidiagonal.
43
44 COMPQ (input) CHARACTER*1
45 Specifies whether singular vectors are to be computed as fol‐
46 lows:
47 = 'N': Compute singular values only;
48 = 'P': Compute singular values and compute singular vectors in
49 compact form; = 'I': Compute singular values and singular vec‐
50 tors.
51
52 N (input) INTEGER
53 The order of the matrix B. N >= 0.
54
55 D (input/output) DOUBLE PRECISION array, dimension (N)
56 On entry, the n diagonal elements of the bidiagonal matrix B.
57 On exit, if INFO=0, the singular values of B.
58
59 E (input/output) DOUBLE PRECISION array, dimension (N-1)
60 On entry, the elements of E contain the offdiagonal elements of
61 the bidiagonal matrix whose SVD is desired. On exit, E has
62 been destroyed.
63
64 U (output) DOUBLE PRECISION array, dimension (LDU,N)
65 If COMPQ = 'I', then: On exit, if INFO = 0, U contains the
66 left singular vectors of the bidiagonal matrix. For other val‐
67 ues of COMPQ, U is not referenced.
68
69 LDU (input) INTEGER
70 The leading dimension of the array U. LDU >= 1. If singular
71 vectors are desired, then LDU >= max( 1, N ).
72
73 VT (output) DOUBLE PRECISION array, dimension (LDVT,N)
74 If COMPQ = 'I', then: On exit, if INFO = 0, VT' contains the
75 right singular vectors of the bidiagonal matrix. For other
76 values of COMPQ, VT is not referenced.
77
78 LDVT (input) INTEGER
79 The leading dimension of the array VT. LDVT >= 1. If singular
80 vectors are desired, then LDVT >= max( 1, N ).
81
82 Q (output) DOUBLE PRECISION array, dimension (LDQ)
83 If COMPQ = 'P', then: On exit, if INFO = 0, Q and IQ contain
84 the left and right singular vectors in a compact form, requir‐
85 ing O(N log N) space instead of 2*N**2. In particular, Q con‐
86 tains all the DOUBLE PRECISION data in LDQ >= N*(11 + 2*SMLSIZ
87 + 8*INT(LOG_2(N/(SMLSIZ+1)))) words of memory, where SMLSIZ is
88 returned by ILAENV and is equal to the maximum size of the sub‐
89 problems at the bottom of the computation tree (usually about
90 25). For other values of COMPQ, Q is not referenced.
91
92 IQ (output) INTEGER array, dimension (LDIQ)
93 If COMPQ = 'P', then: On exit, if INFO = 0, Q and IQ contain
94 the left and right singular vectors in a compact form, requir‐
95 ing O(N log N) space instead of 2*N**2. In particular, IQ con‐
96 tains all INTEGER data in LDIQ >= N*(3 + 3*INT(LOG_2(N/(SML‐
97 SIZ+1)))) words of memory, where SMLSIZ is returned by ILAENV
98 and is equal to the maximum size of the subproblems at the bot‐
99 tom of the computation tree (usually about 25). For other val‐
100 ues of COMPQ, IQ is not referenced.
101
102 WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
103 If COMPQ = 'N' then LWORK >= (4 * N). If COMPQ = 'P' then
104 LWORK >= (6 * N). If COMPQ = 'I' then LWORK >= (3 * N**2 + 4 *
105 N).
106
107 IWORK (workspace) INTEGER array, dimension (8*N)
108
109 INFO (output) INTEGER
110 = 0: successful exit.
111 < 0: if INFO = -i, the i-th argument had an illegal value.
112 > 0: The algorithm failed to compute an singular value. The
113 update process of divide and conquer failed.
114
116 Based on contributions by
117 Ming Gu and Huan Ren, Computer Science Division, University of
118 California at Berkeley, USA
119
120
121
122 LAPACK routine (version 3.2) November 2008 DBDSDC(1)