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

Go to the source code of this file.

Functions/Subroutines

real function stzt01 (M, N, A, AF, LDA, TAU, WORK, LWORK)
 STZT01 More...
 

Function/Subroutine Documentation

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

STZT01

Purpose:
 STZT01 returns
      || A - R*Q || / ( M * eps * ||A|| )
 for an upper trapezoidal A that was factored with STZRQF.
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 REAL array, dimension (LDA,N)
          The original upper trapezoidal M by N matrix A.
[in]AF
          AF is REAL array, dimension (LDA,N)
          The output of STZRQF 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 REAL array, dimension (M)
          Details of the  Householder transformations as returned by
          STZRQF.
[out]WORK
          WORK is REAL 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 stzt01.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  REAL a( lda, * ), af( lda, * ), tau( * ),
111  $ work( lwork )
112 * ..
113 *
114 * =====================================================================
115 *
116 * .. Parameters ..
117  REAL zero, one
118  parameter( zero = 0.0e0, one = 1.0e0 )
119 * ..
120 * .. Local Scalars ..
121  INTEGER i, j
122  REAL norma
123 * ..
124 * .. Local Arrays ..
125  REAL rwork( 1 )
126 * ..
127 * .. External Functions ..
128  REAL slamch, slange
129  EXTERNAL slamch, slange
130 * ..
131 * .. External Subroutines ..
132  EXTERNAL saxpy, slatzm, slaset, xerbla
133 * ..
134 * .. Intrinsic Functions ..
135  INTRINSIC max, real
136 * ..
137 * .. Executable Statements ..
138 *
139  stzt01 = zero
140 *
141  IF( lwork.LT.m*n+m ) THEN
142  CALL xerbla( 'STZT01', 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 = slange( 'One-norm', m, n, a, lda, rwork )
152 *
153 * Copy upper triangle R
154 *
155  CALL slaset( 'Full', m, n, zero, zero, work, m )
156  DO 20 j = 1, m
157  DO 10 i = 1, j
158  work( ( j-1 )*m+i ) = af( i, j )
159  10 CONTINUE
160  20 CONTINUE
161 *
162 * R = R * P(1) * ... *P(m)
163 *
164  DO 30 i = 1, m
165  CALL slatzm( 'Right', i, n-m+1, af( i, m+1 ), lda, tau( i ),
166  $ work( ( i-1 )*m+1 ), work( m*m+1 ), m,
167  $ work( m*n+1 ) )
168  30 CONTINUE
169 *
170 * R = R - A
171 *
172  DO 40 i = 1, n
173  CALL saxpy( m, -one, a( 1, i ), 1, work( ( i-1 )*m+1 ), 1 )
174  40 CONTINUE
175 *
176  stzt01 = slange( 'One-norm', m, n, work, m, rwork )
177 *
178  stzt01 = stzt01 / ( slamch( 'Epsilon' )*REAL( MAX( M, N ) ) )
179  IF( norma.NE.zero )
180  $ stzt01 = stzt01 / norma
181 *
182  RETURN
183 *
184 * End of STZT01
185 *
subroutine slaset(UPLO, M, N, ALPHA, BETA, A, LDA)
SLASET initializes the off-diagonal elements and the diagonal elements of a matrix to given values...
Definition: slaset.f:112
real function slange(NORM, M, N, A, LDA, WORK)
SLANGE returns the value of the 1-norm, Frobenius norm, infinity-norm, or the largest absolute value ...
Definition: slange.f:116
subroutine xerbla(SRNAME, INFO)
XERBLA
Definition: xerbla.f:62
subroutine saxpy(N, SA, SX, INCX, SY, INCY)
SAXPY
Definition: saxpy.f:54
real function stzt01(M, N, A, AF, LDA, TAU, WORK, LWORK)
STZT01
Definition: stzt01.f:100
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:69
subroutine slatzm(SIDE, M, N, V, INCV, TAU, C1, C2, LDC, WORK)
SLATZM
Definition: slatzm.f:153

Here is the call graph for this function: