211 COMPLEX*16 FUNCTION zlatm2( M, N, I, J, KL, KU, IDIST,
212 $ iseed, d, igrade, dl, dr, ipvtng, iwork, sparse )
221 INTEGER I, IDIST, IGRADE, IPVTNG, J, KL, KU, M, N
222 DOUBLE PRECISION SPARSE
227 INTEGER ISEED( 4 ), IWORK( * )
228 COMPLEX*16 D( * ), DL( * ), DR( * )
236 parameter ( czero = ( 0.0d0, 0.0d0 ) )
237 DOUBLE PRECISION ZERO
238 parameter ( zero = 0.0d0 )
249 DOUBLE PRECISION DLARAN
251 EXTERNAL dlaran, zlarnd
266 IF( i.LT.1 .OR. i.GT.m .OR. j.LT.1 .OR. j.GT.n )
THEN
273 IF( j.GT.i+ku .OR. j.LT.i-kl )
THEN
280 IF( sparse.GT.zero )
THEN
281 IF( dlaran( iseed ).LT.sparse )
THEN
289 IF( ipvtng.EQ.0 )
THEN
292 ELSE IF( ipvtng.EQ.1 )
THEN
295 ELSE IF( ipvtng.EQ.2 )
THEN
298 ELSE IF( ipvtng.EQ.3 )
THEN
305 IF( isub.EQ.jsub )
THEN
308 ctemp = zlarnd( idist, iseed )
310 IF( igrade.EQ.1 )
THEN
311 ctemp = ctemp*dl( isub )
312 ELSE IF( igrade.EQ.2 )
THEN
313 ctemp = ctemp*dr( jsub )
314 ELSE IF( igrade.EQ.3 )
THEN
315 ctemp = ctemp*dl( isub )*dr( jsub )
316 ELSE IF( igrade.EQ.4 .AND. isub.NE.jsub )
THEN
317 ctemp = ctemp*dl( isub ) / dl( jsub )
318 ELSE IF( igrade.EQ.5 )
THEN
319 ctemp = ctemp*dl( isub )*dconjg( dl( jsub ) )
320 ELSE IF( igrade.EQ.6 )
THEN
321 ctemp = ctemp*dl( isub )*dl( jsub )
complex *16 function zlatm2(M, N, I, J, KL, KU, IDIST, ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK, SPARSE)
ZLATM2