LAPACK  3.10.0
LAPACK: Linear Algebra PACKage

◆ crzt01()

real function crzt01 ( integer  M,
integer  N,
complex, dimension( lda, * )  A,
complex, dimension( lda, * )  AF,
integer  LDA,
complex, dimension( * )  TAU,
complex, dimension( lwork )  WORK,
integer  LWORK 
)

CRZT01

Purpose:
 CRZT01 returns
      || A - R*Q || / ( M * eps * ||A|| )
 for an upper trapezoidal A that was factored with CTZRZF.
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 array, dimension (LDA,N)
          The original upper trapezoidal M by N matrix A.
[in]AF
          AF is COMPLEX array, dimension (LDA,N)
          The output of CTZRZF 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 array, dimension (M)
          Details of the  Householder transformations as returned by
          CTZRZF.
[out]WORK
          WORK is COMPLEX 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.

Definition at line 96 of file crzt01.f.

98 *
99 * -- LAPACK test routine --
100 * -- LAPACK is a software package provided by Univ. of Tennessee, --
101 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
102 *
103 * .. Scalar Arguments ..
104  INTEGER LDA, LWORK, M, N
105 * ..
106 * .. Array Arguments ..
107  COMPLEX A( LDA, * ), AF( LDA, * ), TAU( * ),
108  $ WORK( LWORK )
109 * ..
110 *
111 * =====================================================================
112 *
113 * .. Parameters ..
114  REAL ZERO, ONE
115  parameter( zero = 0.0e0, one = 1.0e0 )
116 * ..
117 * .. Local Scalars ..
118  INTEGER I, INFO, J
119  REAL NORMA
120 * ..
121 * .. Local Arrays ..
122  REAL RWORK( 1 )
123 * ..
124 * .. External Functions ..
125  REAL CLANGE, SLAMCH
126  EXTERNAL clange, slamch
127 * ..
128 * .. External Subroutines ..
129  EXTERNAL caxpy, claset, cunmrz, xerbla
130 * ..
131 * .. Intrinsic Functions ..
132  INTRINSIC cmplx, max, real
133 * ..
134 * .. Executable Statements ..
135 *
136  crzt01 = zero
137 *
138  IF( lwork.LT.m*n+m ) THEN
139  CALL xerbla( 'CRZT01', 8 )
140  RETURN
141  END IF
142 *
143 * Quick return if possible
144 *
145  IF( m.LE.0 .OR. n.LE.0 )
146  $ RETURN
147 *
148  norma = clange( 'One-norm', m, n, a, lda, rwork )
149 *
150 * Copy upper triangle R
151 *
152  CALL claset( 'Full', m, n, cmplx( zero ), cmplx( zero ), work, m )
153  DO 20 j = 1, m
154  DO 10 i = 1, j
155  work( ( j-1 )*m+i ) = af( i, j )
156  10 CONTINUE
157  20 CONTINUE
158 *
159 * R = R * P(1) * ... *P(m)
160 *
161  CALL cunmrz( 'Right', 'No tranpose', m, n, m, n-m, af, lda, tau,
162  $ work, m, work( m*n+1 ), lwork-m*n, info )
163 *
164 * R = R - A
165 *
166  DO 30 i = 1, n
167  CALL caxpy( m, cmplx( -one ), a( 1, i ), 1,
168  $ work( ( i-1 )*m+1 ), 1 )
169  30 CONTINUE
170 *
171  crzt01 = clange( 'One-norm', m, n, work, m, rwork )
172 *
173  crzt01 = crzt01 / ( slamch( 'Epsilon' )*real( max( m, n ) ) )
174  IF( norma.NE.zero )
175  $ crzt01 = crzt01 / norma
176 *
177  RETURN
178 *
179 * End of CRZT01
180 *
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:60
subroutine caxpy(N, CA, CX, INCX, CY, INCY)
CAXPY
Definition: caxpy.f:88
real function crzt01(M, N, A, AF, LDA, TAU, WORK, LWORK)
CRZT01
Definition: crzt01.f:98
real function clange(NORM, M, N, A, LDA, WORK)
CLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: clange.f:115
subroutine claset(UPLO, M, N, ALPHA, BETA, A, LDA)
CLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values.
Definition: claset.f:106
subroutine cunmrz(SIDE, TRANS, M, N, K, L, A, LDA, TAU, C, LDC, WORK, LWORK, INFO)
CUNMRZ
Definition: cunmrz.f:187
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:68
Here is the call graph for this function: