Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge commit '045db1657e870c721be490b411868f4181a12ced' into surf++
[simgrid.git] / src / include / surf / random_mgr.h
1 /* Copyright (c) 2007-2012. 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
13 SG_BEGIN_DECL()
14
15 typedef enum { NONE, DRAND48, RAND, RNGSTREAM } e_random_generator_t;
16
17 typedef struct random_data_desc {
18   long int seed;
19   double max, min;
20   double mean, std;             /* note: mean and standard deviation are normalized */
21   e_random_generator_t generator;
22 } s_random_data_t, *random_data_t;
23
24 XBT_PUBLIC_DATA(xbt_dict_t) random_data_list;
25
26 XBT_PUBLIC(double) random_generate(random_data_t random);
27 XBT_PUBLIC(random_data_t) random_new(e_random_generator_t generator,
28                                      long int seed,
29                                      double min, double max, double mean,
30                                      double stdDeviation);
31
32 SG_END_DECL()
33 #endif                          /* _SURF_RMGR_H */