LAPACK  3.8.0
LAPACK: Linear Algebra PACKage

◆ dopgtr()

subroutine dopgtr ( character  UPLO,
integer  N,
double precision, dimension( * )  AP,
double precision, dimension( * )  TAU,
double precision, dimension( ldq, * )  Q,
integer  LDQ,
double precision, dimension( * )  WORK,
integer  INFO 
)

DOPGTR

Download DOPGTR + dependencies [TGZ] [ZIP] [TXT]

Purpose:
 DOPGTR generates a real orthogonal matrix Q which is defined as the
 product of n-1 elementary reflectors H(i) of order n, as returned by
 DSPTRD using packed storage:

 if UPLO = 'U', Q = H(n-1) . . . H(2) H(1),

 if UPLO = 'L', Q = H(1) H(2) . . . H(n-1).
Parameters
[in]UPLO
          UPLO is CHARACTER*1
          = 'U': Upper triangular packed storage used in previous
                 call to DSPTRD;
          = 'L': Lower triangular packed storage used in previous
                 call to DSPTRD.
[in]N
          N is INTEGER
          The order of the matrix Q. N >= 0.
[in]AP
          AP is DOUBLE PRECISION array, dimension (N*(N+1)/2)
          The vectors which define the elementary reflectors, as
          returned by DSPTRD.
[in]TAU
          TAU is DOUBLE PRECISION array, dimension (N-1)
          TAU(i) must contain the scalar factor of the elementary
          reflector H(i), as returned by DSPTRD.
[out]Q
          Q is DOUBLE PRECISION array, dimension (LDQ,N)
          The N-by-N orthogonal matrix Q.
[in]LDQ
          LDQ is INTEGER
          The leading dimension of the array Q. LDQ >= max(1,N).
[out]WORK
          WORK is DOUBLE PRECISION array, dimension (N-1)
[out]INFO
          INFO is INTEGER
          = 0:  successful exit
          < 0:  if INFO = -i, the i-th argument had an illegal value
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
December 2016

Definition at line 116 of file dopgtr.f.

116 *
117 * -- LAPACK computational routine (version 3.7.0) --
118 * -- LAPACK is a software package provided by Univ. of Tennessee, --
119 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
120 * December 2016
121 *
122 * .. Scalar Arguments ..
123  CHARACTER uplo
124  INTEGER info, ldq, n
125 * ..
126 * .. Array Arguments ..
127  DOUBLE PRECISION ap( * ), q( ldq, * ), tau( * ), work( * )
128 * ..
129 *
130 * =====================================================================
131 *
132 * .. Parameters ..
133  DOUBLE PRECISION zero, one
134  parameter( zero = 0.0d+0, one = 1.0d+0 )
135 * ..
136 * .. Local Scalars ..
137  LOGICAL upper
138  INTEGER i, iinfo, ij, j
139 * ..
140 * .. External Functions ..
141  LOGICAL lsame
142  EXTERNAL lsame
143 * ..
144 * .. External Subroutines ..
145  EXTERNAL dorg2l, dorg2r, xerbla
146 * ..
147 * .. Intrinsic Functions ..
148  INTRINSIC max
149 * ..
150 * .. Executable Statements ..
151 *
152 * Test the input arguments
153 *
154  info = 0
155  upper = lsame( uplo, 'U' )
156  IF( .NOT.upper .AND. .NOT.lsame( uplo, 'L' ) ) THEN
157  info = -1
158  ELSE IF( n.LT.0 ) THEN
159  info = -2
160  ELSE IF( ldq.LT.max( 1, n ) ) THEN
161  info = -6
162  END IF
163  IF( info.NE.0 ) THEN
164  CALL xerbla( 'DOPGTR', -info )
165  RETURN
166  END IF
167 *
168 * Quick return if possible
169 *
170  IF( n.EQ.0 )
171  $ RETURN
172 *
173  IF( upper ) THEN
174 *
175 * Q was determined by a call to DSPTRD with UPLO = 'U'
176 *
177 * Unpack the vectors which define the elementary reflectors and
178 * set the last row and column of Q equal to those of the unit
179 * matrix
180 *
181  ij = 2
182  DO 20 j = 1, n - 1
183  DO 10 i = 1, j - 1
184  q( i, j ) = ap( ij )
185  ij = ij + 1
186  10 CONTINUE
187  ij = ij + 2
188  q( n, j ) = zero
189  20 CONTINUE
190  DO 30 i = 1, n - 1
191  q( i, n ) = zero
192  30 CONTINUE
193  q( n, n ) = one
194 *
195 * Generate Q(1:n-1,1:n-1)
196 *
197  CALL dorg2l( n-1, n-1, n-1, q, ldq, tau, work, iinfo )
198 *
199  ELSE
200 *
201 * Q was determined by a call to DSPTRD with UPLO = 'L'.
202 *
203 * Unpack the vectors which define the elementary reflectors and
204 * set the first row and column of Q equal to those of the unit
205 * matrix
206 *
207  q( 1, 1 ) = one
208  DO 40 i = 2, n
209  q( i, 1 ) = zero
210  40 CONTINUE
211  ij = 3
212  DO 60 j = 2, n
213  q( 1, j ) = zero
214  DO 50 i = j + 1, n
215  q( i, j ) = ap( ij )
216  ij = ij + 1
217  50 CONTINUE
218  ij = ij + 2
219  60 CONTINUE
220  IF( n.GT.1 ) THEN
221 *
222 * Generate Q(2:n,2:n)
223 *
224  CALL dorg2r( n-1, n-1, n-1, q( 2, 2 ), ldq, tau, work,
225  $ iinfo )
226  END IF
227  END IF
228  RETURN
229 *
230 * End of DOPGTR
231 *
subroutine dorg2l(M, N, K, A, LDA, TAU, WORK, INFO)
DORG2L generates all or part of the orthogonal matrix Q from a QL factorization determined by sgeqlf ...
Definition: dorg2l.f:116
subroutine dorg2r(M, N, K, A, LDA, TAU, WORK, INFO)
DORG2R generates all or part of the orthogonal matrix Q from a QR factorization determined by sgeqrf ...
Definition: dorg2r.f:116
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55
Here is the call graph for this function:
Here is the caller graph for this function: