209 COMPLEX*16 FUNCTION zlatm2( M, N, I, J, KL, KU, IDIST,
210 $ ISEED, D, IGRADE, DL, DR, IPVTNG, IWORK, SPARSE )
218 INTEGER i, idist, igrade, ipvtng, j, kl, ku, m, n
219 DOUBLE PRECISION sparse
224 INTEGER iseed( 4 ), iwork( * )
225 COMPLEX*16 d( * ), dl( * ), dr( * )
233 parameter( czero = ( 0.0d0, 0.0d0 ) )
234 DOUBLE PRECISION zero
235 parameter( zero = 0.0d0 )
263 IF( i.LT.1 .OR. i.GT.m .OR. j.LT.1 .OR. j.GT.n )
THEN
270 IF( j.GT.i+ku .OR. j.LT.i-kl )
THEN
277 IF( sparse.GT.zero )
THEN
278 IF(
dlaran( iseed ).LT.sparse )
THEN
286 IF( ipvtng.EQ.0 )
THEN
289 ELSE IF( ipvtng.EQ.1 )
THEN
292 ELSE IF( ipvtng.EQ.2 )
THEN
295 ELSE IF( ipvtng.EQ.3 )
THEN
302 IF( isub.EQ.jsub )
THEN
305 ctemp =
zlarnd( idist, iseed )
307 IF( igrade.EQ.1 )
THEN
308 ctemp = ctemp*dl( isub )
309 ELSE IF( igrade.EQ.2 )
THEN
310 ctemp = ctemp*dr( jsub )
311 ELSE IF( igrade.EQ.3 )
THEN
312 ctemp = ctemp*dl( isub )*dr( jsub )
313 ELSE IF( igrade.EQ.4 .AND. isub.NE.jsub )
THEN
314 ctemp = ctemp*dl( isub ) / dl( jsub )
315 ELSE IF( igrade.EQ.5 )
THEN
316 ctemp = ctemp*dl( isub )*dconjg( dl( jsub ) )
317 ELSE IF( igrade.EQ.6 )
THEN
318 ctemp = ctemp*dl( isub )*dl( jsub )
double precision function dlaran(iseed)
DLARAN
complex *16 function zlarnd(idist, iseed)
ZLARND
complex *16 function zlatm2(m, n, i, j, kl, ku, idist, iseed, d, igrade, dl, dr, ipvtng, iwork, sparse)
ZLATM2