Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix type name and parsing for random generator.
[simgrid.git] / src / include / surf / random_mgr.h
1 /* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5   * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef _SURF_RMGR_H
8 #define _SURF_RMGR_H
9
10 #include "xbt/heap.h"
11 #include "xbt/dict.h"
12 #include <stdlib.h>
13 #include <math.h>
14
15 SG_BEGIN_DECL()
16
17 typedef enum { NONE, DRAND48, RAND, RNGSTREAM } e_random_generator_t;
18
19 typedef struct random_data_desc {
20   long int seed;
21   double max, min;
22   double mean, std;             /* note: mean and standard deviation are normalized */
23   e_random_generator_t generator;
24 } s_random_data_t, *random_data_t;
25
26 XBT_PUBLIC_DATA(xbt_dict_t) random_data_list;
27
28 XBT_PUBLIC(double) random_generate(random_data_t random);
29 XBT_PUBLIC(random_data_t) random_new(e_random_generator_t generator,
30                                      long int seed,
31                                      double min, double max, double mean,
32                                      double stdDeviation);
33
34 SG_END_DECL()
35 #endif                          /* _SURF_RMGR_H */