1
SUBROUTINE setant(qvalue)
2
C**********************************************************************
4
C SUBROUTINE SETANT(QVALUE)
7
C Sets whether the current generator produces antithetic values. If
8
C X is the value normally returned from a uniform [0,1] random
9
C number generator then 1 - X is the antithetic value. If X is the
10
C value normally returned from a uniform [0,N] random number
11
C generator then N - 1 - X is the antithetic value.
13
C All generators are initialized to NOT generate antithetic values.
15
C This is a transcription from Pascal to Fortran of routine
16
C Set_Antithetic from the paper
18
C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
19
C with Splitting Facilities." ACM Transactions on Mathematical
20
C Software, 17:98-111 (1991)
26
C QVALUE -> .TRUE. if generator G is to generating antithetic
27
C values, otherwise .FALSE.
30
C**********************************************************************
36
C .. Scalar Arguments ..
39
C .. Scalars in Common ..
40
INTEGER a1,a1vw,a1w,a2,a2vw,a2w,m1,m2
42
C .. Arrays in Common ..
43
INTEGER cg1(numg),cg2(numg),ig1(numg),ig2(numg),lg1(numg),
50
C .. External Functions ..
54
C .. External Subroutines ..
58
COMMON /globe/m1,m2,a1,a2,a1w,a2w,a1vw,a2vw,ig1,ig2,lg1,lg2,cg1,
61
C .. Save statement ..
64
C .. Executable Statements ..
65
C Abort unless random number generator initialized
66
IF (qrgnin()) GO TO 10
67
call basout(io,wte,'SETANT called before random number generator')