Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
include portable.h at the right location (Yes, we really need it here...).
[simgrid.git] / src / include / surf / random_mgr.h
1 #ifndef _SURF_RMGR_H
2 #define _SURF_RMGR_H
3
4 #include "xbt/heap.h"
5 #include "xbt/dict.h"
6 #include <stdlib.h>
7 #include <math.h>
8 #include <stdio.h>
9
10 SG_BEGIN_DECL()
11
12 typedef enum {NONE, DRAND48, RAND} Generator;
13
14 typedef struct random_data_desc {
15   long int seed;
16   double max, min;
17   double mean, std; /* note: mean and standard deviation are normalized */
18   Generator generator;
19 } s_random_data_t, *random_data_t;
20
21 XBT_PUBLIC_DATA(xbt_dict_t) random_data_list;
22
23 XBT_PUBLIC(double) random_generate(random_data_t random);
24 XBT_PUBLIC(random_data_t) random_new(Generator generator, long int seed, 
25                                      double min, double max, double mean, 
26                                      double stdDeviation);
27
28 SG_END_DECL()
29
30 #endif                          /* _SURF_RMGR_H */