1ZGELSS(1) LAPACK driver routine (version 3.1) ZGELSS(1)
2
3
4
6 ZGELSS - the minimum norm solution to a complex linear least squares
7 problem
8
10 SUBROUTINE ZGELSS( M, N, NRHS, A, LDA, B, LDB, S, RCOND, RANK, WORK,
11 LWORK, RWORK, INFO )
12
13 INTEGER INFO, LDA, LDB, LWORK, M, N, NRHS, RANK
14
15 DOUBLE PRECISION RCOND
16
17 DOUBLE PRECISION RWORK( * ), S( * )
18
19 COMPLEX*16 A( LDA, * ), B( LDB, * ), WORK( * )
20
22 ZGELSS computes the minimum norm solution to a complex linear least
23 squares problem:
24
25 Minimize 2-norm(| b - A*x |).
26
27 using the singular value decomposition (SVD) of A. A is an M-by-N
28 matrix which may be rank-deficient.
29
30 Several right hand side vectors b and solution vectors x can be handled
31 in a single call; they are stored as the columns of the M-by-NRHS right
32 hand side matrix B and the N-by-NRHS solution matrix X.
33
34 The effective rank of A is determined by treating as zero those singu‐
35 lar values which are less than RCOND times the largest singular value.
36
37
39 M (input) INTEGER
40 The number of rows of the matrix A. M >= 0.
41
42 N (input) INTEGER
43 The number of columns of the matrix A. N >= 0.
44
45 NRHS (input) INTEGER
46 The number of right hand sides, i.e., the number of columns of
47 the matrices B and X. NRHS >= 0.
48
49 A (input/output) COMPLEX*16 array, dimension (LDA,N)
50 On entry, the M-by-N matrix A. On exit, the first min(m,n)
51 rows of A are overwritten with its right singular vectors,
52 stored rowwise.
53
54 LDA (input) INTEGER
55 The leading dimension of the array A. LDA >= max(1,M).
56
57 B (input/output) COMPLEX*16 array, dimension (LDB,NRHS)
58 On entry, the M-by-NRHS right hand side matrix B. On exit, B
59 is overwritten by the N-by-NRHS solution matrix X. If m >= n
60 and RANK = n, the residual sum-of-squares for the solution in
61 the i-th column is given by the sum of squares of the modulus
62 of elements n+1:m in that column.
63
64 LDB (input) INTEGER
65 The leading dimension of the array B. LDB >= max(1,M,N).
66
67 S (output) DOUBLE PRECISION array, dimension (min(M,N))
68 The singular values of A in decreasing order. The condition
69 number of A in the 2-norm = S(1)/S(min(m,n)).
70
71 RCOND (input) DOUBLE PRECISION
72 RCOND is used to determine the effective rank of A. Singular
73 values S(i) <= RCOND*S(1) are treated as zero. If RCOND < 0,
74 machine precision is used instead.
75
76 RANK (output) INTEGER
77 The effective rank of A, i.e., the number of singular values
78 which are greater than RCOND*S(1).
79
80 WORK (workspace/output) COMPLEX*16 array, dimension (MAX(1,LWORK))
81 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
82
83 LWORK (input) INTEGER
84 The dimension of the array WORK. LWORK >= 1, and also: LWORK >=
85 2*min(M,N) + max(M,N,NRHS) For good performance, LWORK should
86 generally be larger.
87
88 If LWORK = -1, then a workspace query is assumed; the routine
89 only calculates the optimal size of the WORK array, returns
90 this value as the first entry of the WORK array, and no error
91 message related to LWORK is issued by XERBLA.
92
93 RWORK (workspace) DOUBLE PRECISION array, dimension (5*min(M,N))
94
95 INFO (output) INTEGER
96 = 0: successful exit
97 < 0: if INFO = -i, the i-th argument had an illegal value.
98 > 0: the algorithm for computing the SVD failed to converge;
99 if INFO = i, i off-diagonal elements of an intermediate bidiag‐
100 onal form did not converge to zero.
101
102
103
104 LAPACK driver routine (version 3.N1o)vember 2006 ZGELSS(1)