LAPACK  3.5.0
LAPACK: Linear Algebra PACKage
ztzt02.f File Reference

Go to the source code of this file.

Functions/Subroutines

double precision function ztzt02 (M, N, AF, LDA, TAU, WORK, LWORK)
 ZTZT02 More...
 

Function/Subroutine Documentation

double precision function ztzt02 ( integer  M,
integer  N,
complex*16, dimension( lda, * )  AF,
integer  LDA,
complex*16, dimension( * )  TAU,
complex*16, dimension( lwork )  WORK,
integer  LWORK 
)

ZTZT02

Purpose:
 ZTZT02 returns
      || I - Q'*Q || / ( M * eps)
 where the matrix Q is defined by the Householder transformations
 generated by ZTZRQF.
Parameters
[in]M
          M is INTEGER
          The number of rows of the matrix AF.
[in]N
          N is INTEGER
          The number of columns of the matrix AF.
[in]AF
          AF is COMPLEX*16 array, dimension (LDA,N)
          The output of ZTZRQF.
[in]LDA
          LDA is INTEGER
          The leading dimension of the array AF.
[in]TAU
          TAU is COMPLEX*16 array, dimension (M)
          Details of the Householder transformations as returned by
          ZTZRQF.
[out]WORK
          WORK is COMPLEX*16 array, dimension (LWORK)
[in]LWORK
          LWORK is INTEGER
          length of WORK array. Must be >= N*N+N
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 93 of file ztzt02.f.

93 *
94 * -- LAPACK test routine (version 3.4.0) --
95 * -- LAPACK is a software package provided by Univ. of Tennessee, --
96 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
97 * November 2011
98 *
99 * .. Scalar Arguments ..
100  INTEGER lda, lwork, m, n
101 * ..
102 * .. Array Arguments ..
103  COMPLEX*16 af( lda, * ), tau( * ), work( lwork )
104 * ..
105 *
106 * =====================================================================
107 *
108 * .. Parameters ..
109  DOUBLE PRECISION zero, one
110  parameter( zero = 0.0d0, one = 1.0d0 )
111 * ..
112 * .. Local Scalars ..
113  INTEGER i
114 * ..
115 * .. Local Arrays ..
116  DOUBLE PRECISION rwork( 1 )
117 * ..
118 * .. External Functions ..
119  DOUBLE PRECISION dlamch, zlange
120  EXTERNAL dlamch, zlange
121 * ..
122 * .. External Subroutines ..
123  EXTERNAL xerbla, zlaset, zlatzm
124 * ..
125 * .. Intrinsic Functions ..
126  INTRINSIC dble, dcmplx, dconjg, max
127 * ..
128 * .. Executable Statements ..
129 *
130  ztzt02 = zero
131 *
132  IF( lwork.LT.n*n+n ) THEN
133  CALL xerbla( 'ZTZT02', 7 )
134  RETURN
135  END IF
136 *
137 * Quick return if possible
138 *
139  IF( m.LE.0 .OR. n.LE.0 )
140  $ RETURN
141 *
142 * Q := I
143 *
144  CALL zlaset( 'Full', n, n, dcmplx( zero ), dcmplx( one ), work,
145  $ n )
146 *
147 * Q := P(1) * ... * P(m) * Q
148 *
149  DO 10 i = m, 1, -1
150  CALL zlatzm( 'Left', n-m+1, n, af( i, m+1 ), lda, tau( i ),
151  $ work( i ), work( m+1 ), n, work( n*n+1 ) )
152  10 CONTINUE
153 *
154 * Q := P(m)' * ... * P(1)' * Q
155 *
156  DO 20 i = 1, m
157  CALL zlatzm( 'Left', n-m+1, n, af( i, m+1 ), lda,
158  $ dconjg( tau( i ) ), work( i ), work( m+1 ), n,
159  $ work( n*n+1 ) )
160  20 CONTINUE
161 *
162 * Q := Q - I
163 *
164  DO 30 i = 1, n
165  work( ( i-1 )*n+i ) = work( ( i-1 )*n+i ) - one
166  30 CONTINUE
167 *
168  ztzt02 = zlange( 'One-norm', n, n, work, n, rwork ) /
169  $ ( dlamch( 'Epsilon' )*dble( max( m, n ) ) )
170  RETURN
171 *
172 * End of ZTZT02
173 *
subroutine zlatzm(SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK)
ZLATZM
Definition: zlatzm.f:154
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
double precision function ztzt02(M, N, AF, LDA, TAU, WORK, LWORK)
ZTZT02
Definition: ztzt02.f:93
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
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
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65

Here is the call graph for this function: