X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f3507930c130404d05f982cf9fe960fb95f7eb4b..f2e9baad7ddb5f9e86719879f359f57c99d258ed:/src/include/surf/random_mgr.h diff --git a/src/include/surf/random_mgr.h b/src/include/surf/random_mgr.h index 7233e715b7..3a75dd4e8e 100644 --- a/src/include/surf/random_mgr.h +++ b/src/include/surf/random_mgr.h @@ -1,3 +1,9 @@ +/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + #ifndef _SURF_RMGR_H #define _SURF_RMGR_H @@ -5,18 +11,24 @@ #include "xbt/dict.h" #include #include -#include -typedef enum {NONE, DRAND48, RAND} Generator; +SG_BEGIN_DECL() + + typedef enum { NONE, DRAND48, RAND } Generator; -typedef struct random_data_desc { - int max, min, mean, stdDeviation; - Generator generator; -} s_random_data_t, *random_data_t; + typedef struct random_data_desc { + long int seed; + double max, min; + double mean, std; /* note: mean and standard deviation are normalized */ + Generator generator; + } s_random_data_t, *random_data_t; XBT_PUBLIC_DATA(xbt_dict_t) random_data_list; -XBT_PUBLIC(float) random_generate(random_data_t random); -XBT_PUBLIC(random_data_t) random_new(int generator, int min, int max, int mean, int stdDeviation); +XBT_PUBLIC(double) random_generate(random_data_t random); +XBT_PUBLIC(random_data_t) random_new(Generator generator, long int seed, + double min, double max, double mean, + double stdDeviation); -#endif /* _SURF_RMGR_H */ +SG_END_DECL() +#endif /* _SURF_RMGR_H */