Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / include / xbt / RngStream.h
1  
2 /* RngStream.h for ANSI C */
3 #ifndef RNGSTREAM_H
4 #define RNGSTREAM_H
5  
6
7
8 typedef struct RngStream_InfoState * RngStream;
9
10 struct RngStream_InfoState {
11    double Cg[6], Bg[6], Ig[6];
12    int Anti;
13    int IncPrec;
14    char *name;
15 };
16
17
18 int RngStream_SetPackageSeed (unsigned long seed[6]);
19
20
21 RngStream RngStream_CreateStream (const char name[]);
22
23
24 void RngStream_DeleteStream (RngStream *pg);
25
26
27 void RngStream_ResetStartStream (RngStream g);
28
29
30 void RngStream_ResetStartSubstream (RngStream g);
31
32
33 void RngStream_ResetNextSubstream (RngStream g);
34
35
36 void RngStream_SetAntithetic (RngStream g, int a);
37
38
39 void RngStream_IncreasedPrecis (RngStream g, int incp);
40
41
42 int RngStream_SetSeed (RngStream g, unsigned long seed[6]);
43
44
45 void RngStream_AdvanceState (RngStream g, long e, long c);
46
47
48 void RngStream_GetState (RngStream g, unsigned long seed[6]);
49
50
51 void RngStream_WriteState (RngStream g);
52
53
54 void RngStream_WriteStateFull (RngStream g);
55
56
57 double RngStream_RandU01 (RngStream g);
58
59
60 int RngStream_RandInt (RngStream g, int i, int j);
61  
62
63 #endif
64  
65