169 SUBROUTINE dlatdf( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV,
178 DOUBLE PRECISION RDSCAL, RDSUM
181 INTEGER IPIV( * ), JPIV( * )
182 DOUBLE PRECISION RHS( * ), Z( LDZ, * )
189 parameter( maxdim = 8 )
190 DOUBLE PRECISION ZERO, ONE
191 parameter( zero = 0.0d+0, one = 1.0d+0 )
194 INTEGER I, INFO, J, K
195 DOUBLE PRECISION BM, BP, PMONE, SMINU, SPLUS, TEMP
198 INTEGER IWORK( MAXDIM )
199 DOUBLE PRECISION WORK( 4*MAXDIM ), XM( MAXDIM ), XP( MAXDIM )
206 DOUBLE PRECISION DASUM, DDOT
218 CALL dlaswp( 1, rhs, ldz, 1, n-1, ipiv, 1 )
232 splus = splus + ddot( n-j, z( j+1, j ), 1, z( j+1, j ), 1 )
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 daxpy(n, da, dx, incx, dy, incy)
DAXPY
subroutine dcopy(n, dx, incx, dy, incy)
DCOPY
subroutine dgecon(norm, n, a, lda, anorm, rcond, work, iwork, info)
DGECON
subroutine dgesc2(n, a, lda, rhs, ipiv, jpiv, scale)
DGESC2 solves a system of linear equations using the LU factorization with complete pivoting computed...
subroutine dlassq(n, x, incx, scale, sumsq)
DLASSQ updates a sum of squares represented in scaled form.
subroutine dlaswp(n, a, lda, k1, k2, ipiv, incx)
DLASWP performs a series of row interchanges on a general rectangular matrix.
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 ...
subroutine dscal(n, da, dx, incx)
DSCAL