1CGESVD(1)             LAPACK driver routine (version 3.2)            CGESVD(1)
2
3
4

NAME

6       CGESVD  -  computes the singular value decomposition (SVD) of a complex
7       M-by-N matrix A, optionally computing the left  and/or  right  singular
8       vectors
9

SYNOPSIS

11       SUBROUTINE CGESVD( JOBU,  JOBVT,  M,  N,  A,  LDA, S, U, LDU, VT, LDVT,
12                          WORK, LWORK, RWORK, INFO )
13
14           CHARACTER      JOBU, JOBVT
15
16           INTEGER        INFO, LDA, LDU, LDVT, LWORK, M, N
17
18           REAL           RWORK( * ), S( * )
19
20           COMPLEX        A( LDA, * ), U( LDU, * ), VT( LDVT, * ), WORK( * )
21

PURPOSE

23       CGESVD computes the singular value decomposition (SVD) of a complex  M-
24       by-N matrix A, optionally computing the left and/or right singular vec‐
25       tors. The SVD is written
26            A = U * SIGMA * conjugate-transpose(V)
27       where SIGMA is an M-by-N matrix which is zero except for  its  min(m,n)
28       diagonal  elements,  U  is an M-by-M unitary matrix, and V is an N-by-N
29       unitary matrix.  The diagonal elements of SIGMA are the singular values
30       of  A;  they  are real and non-negative, and are returned in descending
31       order.  The first min(m,n) columns of U and V are the  left  and  right
32       singular vectors of A.
33       Note that the routine returns V**H, not V.
34

ARGUMENTS

36       JOBU    (input) CHARACTER*1
37               Specifies options for computing all or part of the matrix U:
38               = 'A':  all M columns of U are returned in array U:
39               = 'S':  the first min(m,n) columns of U (the left singular vec‐
40               tors) are returned in the array U; = 'O':  the  first  min(m,n)
41               columns of U (the left singular vectors) are overwritten on the
42               array A; = 'N':  no columns of U (no left singular vectors) are
43               computed.
44
45       JOBVT   (input) CHARACTER*1
46               Specifies options for computing all or part of the matrix V**H:
47               = 'A':  all N rows of V**H are returned in the array VT;
48               =  'S':   the  first  min(m,n) rows of V**H (the right singular
49               vectors) are returned in  the  array  VT;  =  'O':   the  first
50               min(m,n)  rows  of  V**H (the right singular vectors) are over‐
51               written on the array A; = 'N':  no rows of V**H (no right  sin‐
52               gular  vectors)  are  computed.   JOBVT and JOBU cannot both be
53               'O'.
54
55       M       (input) INTEGER
56               The number of rows of the input matrix A.  M >= 0.
57
58       N       (input) INTEGER
59               The number of columns of the input matrix A.  N >= 0.
60
61       A       (input/output) COMPLEX array, dimension (LDA,N)
62               On entry, the M-by-N matrix A.  On exit, if JOBU = 'O',   A  is
63               overwritten with the first min(m,n) columns of U (the left sin‐
64               gular vectors, stored columnwise); if JOBVT = 'O', A  is  over‐
65               written  with the first min(m,n) rows of V**H (the right singu‐
66               lar vectors, stored rowwise); if JOBU .ne. 'O' and  JOBVT  .ne.
67               'O', the contents of A are destroyed.
68
69       LDA     (input) INTEGER
70               The leading dimension of the array A.  LDA >= max(1,M).
71
72       S       (output) REAL array, dimension (min(M,N))
73               The singular values of A, sorted so that S(i) >= S(i+1).
74
75       U       (output) COMPLEX array, dimension (LDU,UCOL)
76               (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.  If JOBU
77               = 'A', U contains the M-by-M unitary matrix U; if JOBU = 'S', U
78               contains  the  first  min(m,n)  columns of U (the left singular
79               vectors, stored columnwise); if JOBU = 'N' or  'O',  U  is  not
80               referenced.
81
82       LDU     (input) INTEGER
83               The  leading dimension of the array U.  LDU >= 1; if JOBU = 'S'
84               or 'A', LDU >= M.
85
86       VT      (output) COMPLEX array, dimension (LDVT,N)
87               If JOBVT = 'A', VT contains the N-by-N unitary matrix V**H;  if
88               JOBVT  =  'S', VT contains the first min(m,n) rows of V**H (the
89               right singular vectors, stored rowwise); if JOBVT = 'N' or 'O',
90               VT is not referenced.
91
92       LDVT    (input) INTEGER
93               The  leading  dimension of the array VT.  LDVT >= 1; if JOBVT =
94               'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
95
96       WORK    (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
97               On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
98
99       LWORK   (input) INTEGER
100               The    dimension    of    the    array    WORK.     LWORK    >=
101               MAX(1,2*MIN(M,N)+MAX(M,N)).  For good performance, LWORK should
102               generally be larger.  If LWORK = -1, then a workspace query  is
103               assumed;  the  routine  only calculates the optimal size of the
104               WORK array, returns this value as the first entry of  the  WORK
105               array,  and  no  error  message  related  to LWORK is issued by
106               XERBLA.
107
108       RWORK   (workspace) REAL array, dimension (5*min(M,N))
109               On exit, if INFO > 0, RWORK(1:MIN(M,N)-1) contains  the  uncon‐
110               verged  superdiagonal  elements of an upper bidiagonal matrix B
111               whose diagonal is in S (not necessarily sorted).  B satisfies A
112               = U * B * VT, so it has the same singular values as A, and sin‐
113               gular vectors related by U and VT.
114
115       INFO    (output) INTEGER
116               = 0:  successful exit.
117               < 0:  if INFO = -i, the i-th argument had an illegal value.
118               > 0:  if CBDSQR did  not  converge,  INFO  specifies  how  many
119               superdiagonals  of  an  intermediate  bidiagonal form B did not
120               converge to zero.  See  the  description  of  RWORK  above  for
121               details.
122
123
124
125 LAPACK driver routine (version 3.N2o)vember 2008                       CGESVD(1)
Impressum