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 )
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 )