1CGEQP3(1) LAPACK routine (version 3.2) CGEQP3(1)
2
3
4
6 CGEQP3 - computes a QR factorization with column pivoting of a matrix A
7
9 SUBROUTINE CGEQP3( M, N, A, LDA, JPVT, TAU, WORK, LWORK, RWORK, INFO )
10
11 INTEGER INFO, LDA, LWORK, M, N
12
13 INTEGER JPVT( * )
14
15 REAL RWORK( * )
16
17 COMPLEX A( LDA, * ), TAU( * ), WORK( * )
18
20 CGEQP3 computes a QR factorization with column pivoting of a matrix A:
21 A*P = Q*R using Level 3 BLAS.
22
24 M (input) INTEGER
25 The number of rows of the matrix A. M >= 0.
26
27 N (input) INTEGER
28 The number of columns of the matrix A. N >= 0.
29
30 A (input/output) COMPLEX array, dimension (LDA,N)
31 On entry, the M-by-N matrix A. On exit, the upper triangle of
32 the array contains the min(M,N)-by-N upper trapezoidal matrix
33 R; the elements below the diagonal, together with the array
34 TAU, represent the unitary matrix Q as a product of min(M,N)
35 elementary reflectors.
36
37 LDA (input) INTEGER
38 The leading dimension of the array A. LDA >= max(1,M).
39
40 JPVT (input/output) INTEGER array, dimension (N)
41 On entry, if JPVT(J).ne.0, the J-th column of A is permuted to
42 the front of A*P (a leading column); if JPVT(J)=0, the J-th
43 column of A is a free column. On exit, if JPVT(J)=K, then the
44 J-th column of A*P was the the K-th column of A.
45
46 TAU (output) COMPLEX array, dimension (min(M,N))
47 The scalar factors of the elementary reflectors.
48
49 WORK (workspace/output) COMPLEX array, dimension (MAX(1,LWORK))
50 On exit, if INFO=0, WORK(1) returns the optimal LWORK.
51
52 LWORK (input) INTEGER
53 The dimension of the array WORK. LWORK >= N+1. For optimal
54 performance LWORK >= ( N+1 )*NB, where NB is the optimal block‐
55 size. If LWORK = -1, then a workspace query is assumed; the
56 routine only calculates the optimal size of the WORK array,
57 returns this value as the first entry of the WORK array, and no
58 error message related to LWORK is issued by XERBLA.
59
60 RWORK (workspace) REAL array, dimension (2*N)
61
62 INFO (output) INTEGER
63 = 0: successful exit.
64 < 0: if INFO = -i, the i-th argument had an illegal value.
65
67 The matrix Q is represented as a product of elementary reflectors
68 Q = H(1) H(2) . . . H(k), where k = min(m,n).
69 Each H(i) has the form
70 H(i) = I - tau * v * v'
71 where tau is a real/complex scalar, and v is a real/complex vector with
72 v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
73 and tau in TAU(i).
74 Based on contributions by
75 G. Quintana-Orti, Depto. de Informatica, Universidad Jaime I, Spain
76 X. Sun, Computer Science Dept., Duke University, USA
77
78
79
80 LAPACK routine (version 3.2) November 2008 CGEQP3(1)