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