* G05MKF Example Program Text * Mark 20 Release. NAG Copyright 2001. * .. Parameters .. INTEGER NOUT, N, NR PARAMETER (NOUT=6,N=10,NR=120) * .. Local Scalars .. DOUBLE PRECISION LAMBDA INTEGER I, IFAIL, IGEN * .. Local Arrays .. DOUBLE PRECISION R(NR) INTEGER ISEED(4), X(N) * .. External Subroutines .. EXTERNAL G05KBF, G05MKF * .. Executable Statements .. WRITE (NOUT,*) 'G05MKF Example Program Results' WRITE (NOUT,*) * Set the distribution parameter LAMBDA LAMBDA = 20.0D0 * Initialise the seed to a repeatable sequence ISEED(1) = 1762543 ISEED(2) = 9324783 ISEED(3) = 42344 ISEED(4) = 742355 * IGEN identifies the stream. IGEN = 1 CALL G05KBF(IGEN,ISEED) IFAIL = 0 * Generate reference vector R CALL G05MKF(0,LAMBDA,N,X,IGEN,ISEED,R,NR,IFAIL) * Generate integers and store in X CALL G05MKF(1,LAMBDA,N,X,IGEN,ISEED,R,NR,IFAIL) * WRITE (NOUT,99999) (X(I),I=1,N) STOP * 99999 FORMAT (1X,I12) END