3
* =========== DOCUMENTATION ===========
5
* Online html documentation available at
6
* http://www.netlib.org/lapack/explore-html/
9
*> Download DORMLQ + dependencies
10
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dormlq.f">
12
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dormlq.f">
14
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dormlq.f">
21
* SUBROUTINE DORMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
24
* .. Scalar Arguments ..
25
* CHARACTER SIDE, TRANS
26
* INTEGER INFO, K, LDA, LDC, LWORK, M, N
28
* .. Array Arguments ..
29
* DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
38
*> DORMLQ overwrites the general real M-by-N matrix C with
40
*> SIDE = 'L' SIDE = 'R'
41
*> TRANS = 'N': Q * C C * Q
42
*> TRANS = 'T': Q**T * C C * Q**T
44
*> where Q is a real orthogonal matrix defined as the product of k
45
*> elementary reflectors
47
*> Q = H(k) . . . H(2) H(1)
49
*> as returned by DGELQF. Q is of order M if SIDE = 'L' and of order N
58
*> SIDE is CHARACTER*1
59
*> = 'L': apply Q or Q**T from the Left;
60
*> = 'R': apply Q or Q**T from the Right.
65
*> TRANS is CHARACTER*1
66
*> = 'N': No transpose, apply Q;
67
*> = 'T': Transpose, apply Q**T.
73
*> The number of rows of the matrix C. M >= 0.
79
*> The number of columns of the matrix C. N >= 0.
85
*> The number of elementary reflectors whose product defines
87
*> If SIDE = 'L', M >= K >= 0;
88
*> if SIDE = 'R', N >= K >= 0.
93
*> A is DOUBLE PRECISION array, dimension
94
*> (LDA,M) if SIDE = 'L',
95
*> (LDA,N) if SIDE = 'R'
96
*> The i-th row must contain the vector which defines the
97
*> elementary reflector H(i), for i = 1,2,...,k, as returned by
98
*> DGELQF in the first k rows of its array argument A.
104
*> The leading dimension of the array A. LDA >= max(1,K).
109
*> TAU is DOUBLE PRECISION array, dimension (K)
110
*> TAU(i) must contain the scalar factor of the elementary
111
*> reflector H(i), as returned by DGELQF.
116
*> C is DOUBLE PRECISION array, dimension (LDC,N)
117
*> On entry, the M-by-N matrix C.
118
*> On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
124
*> The leading dimension of the array C. LDC >= max(1,M).
129
*> WORK is DOUBLE PRECISION array, dimension (MAX(1,LWORK))
130
*> On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
136
*> The dimension of the array WORK.
137
*> If SIDE = 'L', LWORK >= max(1,N);
138
*> if SIDE = 'R', LWORK >= max(1,M).
139
*> For optimum performance LWORK >= N*NB if SIDE = 'L', and
140
*> LWORK >= M*NB if SIDE = 'R', where NB is the optimal
143
*> If LWORK = -1, then a workspace query is assumed; the routine
144
*> only calculates the optimal size of the WORK array, returns
145
*> this value as the first entry of the WORK array, and no error
146
*> message related to LWORK is issued by XERBLA.
152
*> = 0: successful exit
153
*> < 0: if INFO = -i, the i-th argument had an illegal value
159
*> \author Univ. of Tennessee
160
*> \author Univ. of California Berkeley
161
*> \author Univ. of Colorado Denver
164
*> \date November 2011
166
*> \ingroup doubleOTHERcomputational
168
* =====================================================================
1
169
SUBROUTINE DORMLQ( SIDE, TRANS, M, N, K, A, LDA, TAU, C, LDC,
2
170
$ WORK, LWORK, INFO )
4
* -- LAPACK routine (version 2.0) --
5
* Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd.,
6
* Courant Institute, Argonne National Lab, and Rice University
172
* -- LAPACK computational routine (version 3.4.0) --
173
* -- LAPACK is a software package provided by Univ. of Tennessee, --
174
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
9
177
* .. Scalar Arguments ..
10
178
CHARACTER SIDE, TRANS
11
179
INTEGER INFO, K, LDA, LDC, LWORK, M, N
13
181
* .. Array Arguments ..
14
DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ),
182
DOUBLE PRECISION A( LDA, * ), C( LDC, * ), TAU( * ), WORK( * )
19
* $Id: dormlq.f 19697 2010-10-29 16:57:34Z d3y133 $
24
* DORMLQ overwrites the general real M-by-N matrix C with
26
* SIDE = 'L' SIDE = 'R'
27
* TRANS = 'N': Q * C C * Q
28
* TRANS = 'T': Q**T * C C * Q**T
30
* where Q is a real orthogonal matrix defined as the product of k
31
* elementary reflectors
33
* Q = H(k) . . . H(2) H(1)
35
* as returned by DGELQF. Q is of order M if SIDE = 'L' and of order N
41
* SIDE (input) CHARACTER*1
42
* = 'L': apply Q or Q**T from the Left;
43
* = 'R': apply Q or Q**T from the Right.
45
* TRANS (input) CHARACTER*1
46
* = 'N': No transpose, apply Q;
47
* = 'T': Transpose, apply Q**T.
50
* The number of rows of the matrix C. M >= 0.
53
* The number of columns of the matrix C. N >= 0.
56
* The number of elementary reflectors whose product defines
58
* If SIDE = 'L', M >= K >= 0;
59
* if SIDE = 'R', N >= K >= 0.
61
* A (input) DOUBLE PRECISION array, dimension
62
* (LDA,M) if SIDE = 'L',
63
* (LDA,N) if SIDE = 'R'
64
* The i-th row must contain the vector which defines the
65
* elementary reflector H(i), for i = 1,2,...,k, as returned by
66
* DGELQF in the first k rows of its array argument A.
67
* A is modified by the routine but restored on exit.
70
* The leading dimension of the array A. LDA >= max(1,K).
72
* TAU (input) DOUBLE PRECISION array, dimension (K)
73
* TAU(i) must contain the scalar factor of the elementary
74
* reflector H(i), as returned by DGELQF.
76
* C (input/output) DOUBLE PRECISION array, dimension (LDC,N)
77
* On entry, the M-by-N matrix C.
78
* On exit, C is overwritten by Q*C or Q**T*C or C*Q**T or C*Q.
81
* The leading dimension of the array C. LDC >= max(1,M).
83
* WORK (workspace/output) DOUBLE PRECISION array, dimension (LWORK)
84
* On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
86
* LWORK (input) INTEGER
87
* The dimension of the array WORK.
88
* If SIDE = 'L', LWORK >= max(1,N);
89
* if SIDE = 'R', LWORK >= max(1,M).
90
* For optimum performance LWORK >= N*NB if SIDE = 'L', and
91
* LWORK >= M*NB if SIDE = 'R', where NB is the optimal
94
* INFO (output) INTEGER
95
* = 0: successful exit
96
* < 0: if INFO = -i, the i-th argument had an illegal value
98
185
* =====================================================================
100
187
* .. Parameters ..