Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Functions RngStream must be XBT_PUBLIC for dll
[simgrid.git] / include / xbt / RngStream.h
1  
2 /* RngStream.h for ANSI C */
3 #ifndef RNGSTREAM_H
4 #define RNGSTREAM_H
5  
6 #include "misc.h"
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 XBT_PUBLIC(int) RngStream_SetPackageSeed (unsigned long seed[6]);
19
20
21 XBT_PUBLIC(RngStream) RngStream_CreateStream (const char name[]);
22
23
24 XBT_PUBLIC(void) RngStream_DeleteStream (RngStream *pg);
25
26
27 XBT_PUBLIC(void) RngStream_ResetStartStream (RngStream g);
28
29
30 XBT_PUBLIC(void) RngStream_ResetStartSubstream (RngStream g);
31
32
33 XBT_PUBLIC(void) RngStream_ResetNextSubstream (RngStream g);
34
35
36 XBT_PUBLIC(void) RngStream_SetAntithetic (RngStream g, int a);
37
38
39 XBT_PUBLIC(void) RngStream_IncreasedPrecis (RngStream g, int incp);
40
41
42 XBT_PUBLIC(int) RngStream_SetSeed (RngStream g, unsigned long seed[6]);
43
44
45 XBT_PUBLIC(void) RngStream_AdvanceState (RngStream g, long e, long c);
46
47
48 XBT_PUBLIC(void) RngStream_GetState (RngStream g, unsigned long seed[6]);
49
50
51 XBT_PUBLIC(void) RngStream_WriteState (RngStream g);
52
53
54 XBT_PUBLIC(void) RngStream_WriteStateFull (RngStream g);
55
56
57 XBT_PUBLIC(double) RngStream_RandU01 (RngStream g);
58
59
60 XBT_PUBLIC(int) RngStream_RandInt (RngStream g, int i, int j);
61  
62
63 #endif
64  
65