GNU Octave 10.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
getsd.f
Go to the documentation of this file.
1 SUBROUTINE getsd(iseed1,iseed2)
2C**********************************************************************
3C
4C SUBROUTINE GETSD(G,ISEED1,ISEED2)
5C GET SeeD
6C
7C Returns the value of two integer seeds of the current generator
8C
9C This is a transcription from Pascal to Fortran of routine
10C Get_State from the paper
11C
12C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package
13C with Splitting Facilities." ACM Transactions on Mathematical
14C Software, 17:98-111 (1991)
15C
16C
17C Arguments
18C
19C
20C
21C ISEED1 <- First integer seed of generator G
22C INTEGER ISEED1
23C
24C ISEED2 <- Second integer seed of generator G
25C INTEGER ISEED1
26C
27C**********************************************************************
28C .. Parameters ..
29 INTEGER*4 numg
30 parameter(numg=32)
31C ..
32C .. Scalar Arguments ..
33 INTEGER*4 iseed1,iseed2
34C ..
35C .. Scalars in Common ..
36 INTEGER*4 a1,a1vw,a1w,a2,a2vw,a2w,m1,m2
37C ..
38C .. Arrays in Common ..
39 INTEGER*4 cg1(numg),cg2(numg),ig1(numg),ig2(numg),lg1(numg),
40 + lg2(numg)
41 LOGICAL qanti(numg)
42C ..
43C .. Local Scalars ..
44 INTEGER*4 g
45C ..
46C .. External Functions ..
47 LOGICAL qrgnin
48 EXTERNAL qrgnin
49C ..
50C .. External Subroutines ..
51 EXTERNAL getcgn
52C ..
53C .. Common blocks ..
54 COMMON /globe/m1,m2,a1,a2,a1w,a2w,a1vw,a2vw,ig1,ig2,lg1,lg2,cg1,
55 + cg2,qanti
56C ..
57C .. Save statement ..
58 SAVE /globe/
59C ..
60C .. Executable Statements ..
61C Abort unless random number generator initialized
62 IF (qrgnin()) GO TO 10
63 WRITE (*,*) ' GETSD called before random number generator ',
64 + ' initialized -- abort!'
65 CALL xstopx
66 + (' GETSD called before random number generator initialized')
67
68 10 CALL getcgn(g)
69 iseed1 = cg1(g)
70 iseed2 = cg2(g)
71 RETURN
72
73 END
subroutine getcgn(g)
Definition getcgn.f:2
subroutine getsd(iseed1, iseed2)
Definition getsd.f:2