167 SUBROUTINE dlatdf( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
176 DOUBLE PRECISION RDSCAL, RDSUM
179 INTEGER IPIV( * ), JPIV( * )
180 DOUBLE PRECISION RHS( * ), Z( LDZ, * )
187 parameter( maxdim = 8 )
188 DOUBLE PRECISION ZERO, ONE
189 parameter( zero = 0.0d+0, one = 1.0d+0 )
192 INTEGER I, INFO, J, K
193 DOUBLE PRECISION BM, BP, PMONE, SMINU, SPLUS, TEMP
196 INTEGER IWORK( MAXDIM )
197 DOUBLE PRECISION WORK( 4*MAXDIM ), XM( MAXDIM ), XP( MAXDIM )
205 DOUBLE PRECISION DASUM, DDOT
217 CALL dlaswp( 1, rhs, ldz, 1, n-1, ipiv, 1 )
231 splus = splus + ddot( n-j, z( j+1, j ), 1, z( j+1, j ),
233 sminu = ddot( n-j, z( j+1, j ), 1, rhs( j+1 ), 1 )
234 splus = splus*rhs( j )
235 IF( splus.GT.sminu )
THEN
237 ELSE IF( sminu.GT.splus )
THEN
247 rhs( j ) = rhs( j ) + pmone
254 CALL daxpy( n-j, temp, z( j+1, j ), 1, rhs( j+1 ), 1 )
263 CALL dcopy( n-1, rhs, 1, xp, 1 )
264 xp( n ) = rhs( n ) + one
265 rhs( n ) = rhs( n ) - one
269 temp = one / z( i, i )
270 xp( i ) = xp( i )*temp
271 rhs( i ) = rhs( i )*temp
273 xp( i ) = xp( i ) - xp( k )*( z( i, k )*temp )
274 rhs( i ) = rhs( i ) - rhs( k )*( z( i, k )*temp )
276 splus = splus + abs( xp( i ) )
277 sminu = sminu + abs( rhs( i ) )
280 $
CALL dcopy( n, xp, 1, rhs, 1 )
284 CALL dlaswp( 1, rhs, ldz, 1, n-1, jpiv, -1 )
288 CALL dlassq( n, rhs, 1, rdscal, rdsum )
294 CALL dgecon(
'I', n, z, ldz, one, temp, work, iwork, info )
295 CALL dcopy( n, work( n+1 ), 1, xm, 1 )
299 CALL dlaswp( 1, xm, ldz, 1, n-1, ipiv, -1 )
300 temp = one / sqrt( ddot( n, xm, 1, xm, 1 ) )
301 CALL dscal( n, temp, xm, 1 )
302 CALL dcopy( n, xm, 1, xp, 1 )
303 CALL daxpy( n, one, rhs, 1, xp, 1 )
304 CALL daxpy( n, -one, xm, 1, rhs, 1 )
305 CALL dgesc2( n, z, ldz, rhs, ipiv, jpiv, temp )
306 CALL dgesc2( n, z, ldz, xp, ipiv, jpiv, temp )
307 IF( dasum( n, xp, 1 ).GT.dasum( n, rhs, 1 ) )
308 $
CALL dcopy( n, xp, 1, rhs, 1 )
312 CALL dlassq( n, rhs, 1, rdscal, rdsum )
subroutine dlatdf(ijob, n, z, ldz, rhs, rdsum, rdscal, ipiv, jpiv)
DLATDF uses the LU factorization of the n-by-n matrix computed by sgetc2 and computes a contribution ...