LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
double precision function zrzt01 ( integer  M,
integer  N,
complex*16, dimension( lda, * )  A,
complex*16, dimension( lda, * )  AF,
integer  LDA,
complex*16, dimension( * )  TAU,
complex*16, dimension( lwork )  WORK,
integer  LWORK 
)

ZRZT01

Purpose:
 ZRZT01 returns
      || A - R*Q || / ( M * eps * ||A|| )
 for an upper trapezoidal A that was factored with ZTZRZF.
Parameters
[in]M
          M is INTEGER
          The number of rows of the matrices A and AF.
[in]N
          N is INTEGER
          The number of columns of the matrices A and AF.
[in]A
          A is COMPLEX*16 array, dimension (LDA,N)
          The original upper trapezoidal M by N matrix A.
[in]AF
          AF is COMPLEX*16 array, dimension (LDA,N)
          The output of ZTZRZF for input matrix A.
          The lower triangle is not referenced.
[in]LDA
          LDA is INTEGER
          The leading dimension of the arrays A and AF.
[in]TAU
          TAU is COMPLEX*16 array, dimension (M)
          Details of the  Householder transformations as returned by
          ZTZRZF.
[out]WORK
          WORK is COMPLEX*16 array, dimension (LWORK)
[in]LWORK
          LWORK is INTEGER
          The length of the array WORK.  LWORK >= m*n + m.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 100 of file zrzt01.f.

100 *
101 * -- LAPACK test routine (version 3.4.0) --
102 * -- LAPACK is a software package provided by Univ. of Tennessee, --
103 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
104 * November 2011
105 *
106 * .. Scalar Arguments ..
107  INTEGER lda, lwork, m, n
108 * ..
109 * .. Array Arguments ..
110  COMPLEX*16 a( lda, * ), af( lda, * ), tau( * ),
111  $ work( lwork )
112 * ..
113 *
114 * =====================================================================
115 *
116 * .. Parameters ..
117  DOUBLE PRECISION zero, one
118  parameter ( zero = 0.0d0, one = 1.0d0 )
119 * ..
120 * .. Local Scalars ..
121  INTEGER i, info, j
122  DOUBLE PRECISION norma
123 * ..
124 * .. Local Arrays ..
125  DOUBLE PRECISION rwork( 1 )
126 * ..
127 * .. External Functions ..
128  DOUBLE PRECISION dlamch, zlange
129  EXTERNAL dlamch, zlange
130 * ..
131 * .. External Subroutines ..
132  EXTERNAL xerbla, zaxpy, zlaset, zunmrz
133 * ..
134 * .. Intrinsic Functions ..
135  INTRINSIC dble, dcmplx, max
136 * ..
137 * .. Executable Statements ..
138 *
139  zrzt01 = zero
140 *
141  IF( lwork.LT.m*n+m ) THEN
142  CALL xerbla( 'ZRZT01', 8 )
143  RETURN
144  END IF
145 *
146 * Quick return if possible
147 *
148  IF( m.LE.0 .OR. n.LE.0 )
149  $ RETURN
150 *
151  norma = zlange( 'One-norm', m, n, a, lda, rwork )
152 *
153 * Copy upper triangle R
154 *
155  CALL zlaset( 'Full', m, n, dcmplx( zero ), dcmplx( zero ), work,
156  $ m )
157  DO 20 j = 1, m
158  DO 10 i = 1, j
159  work( ( j-1 )*m+i ) = af( i, j )
160  10 CONTINUE
161  20 CONTINUE
162 *
163 * R = R * P(1) * ... *P(m)
164 *
165  CALL zunmrz( 'Right', 'No tranpose', m, n, m, n-m, af, lda, tau,
166  $ work, m, work( m*n+1 ), lwork-m*n, info )
167 *
168 * R = R - A
169 *
170  DO 30 i = 1, n
171  CALL zaxpy( m, dcmplx( -one ), a( 1, i ), 1,
172  $ work( ( i-1 )*m+1 ), 1 )
173  30 CONTINUE
174 *
175  zrzt01 = zlange( 'One-norm', m, n, work, m, rwork )
176 *
177  zrzt01 = zrzt01 / ( dlamch( 'Epsilon' )*dble( max( m, n ) ) )
178  IF( norma.NE.zero )
179  $ zrzt01 = zrzt01 / norma
180 *
181  RETURN
182 *
183 * End of ZRZT01
184 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
subroutine zlaset(UPLO, M, N, ALPHA, BETA, A, LDA)
ZLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
Definition: zlaset.f:108
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
double precision function zlange(NORM, M, N, A, LDA, WORK)
ZLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: zlange.f:117
subroutine zunmrz(SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
ZUNMRZ
Definition: zunmrz.f:189
double precision function zrzt01(M, N, A, AF, LDA, TAU, WORK, LWORK)
ZRZT01
Definition: zrzt01.f:100
subroutine zaxpy(N, ZA, ZX, INCX, ZY, INCY)
ZAXPY
Definition: zaxpy.f:53

Here is the call graph for this function: