4420132611ca5259ffabd72988304659bd0e5057
[GPU.git] / WCudaMSE / BilatTools_CPP / src / core / tools / header / AleaTools.h
1 #ifndef ALEATOOLS_H_
2 #define ALEATOOLS_H_
3
4 #include <cstdlib>
5 #include <time.h>
6
7 /*----------------------------------------------------------------------*\
8 |* Declaration *|
9 \*---------------------------------------------------------------------*/
10
11
12 /**
13 * Not thread safe, see OpenpTools to obtian random number with parrallel thread
14 */
15 class AleaTools
16 {
17 public:
18
19 /*--------------------------------------*\
20 |* Constructor *|
21 \*-------------------------------------*/
22
23 /**
24 * practice srand(time(NULL));
25 */
26 AleaTools();
27
28 /*--------------------------------------*\
29 |* Destructor *|
30 \*-------------------------------------*/
31
32 virtual ~AleaTools();
33
34 /*--------------------------------------*\
35 |* Methodes *|
36 \*-------------------------------------*/
37
38 /**
39 * in [a,b]
40 * Attention : pas thread safe
41 */
42 double uniformeAB(double a,double b);
43
44 /**
45 * in [0,1]
46 * Attention : pas thread safe
47 */
48 double uniforme01(void);
49
50 /**
51 * in [a,b]
52 * Attention : pas thread safe
53 */
54 int uniformeAB(int a,int b);
55
56
57 private:
58
59 /*--------------------------------------*\
60 |* Methodes *|
61 \*-------------------------------------*/
62
63 /*--------------------------------------*\
64 |* Attributs *|
65 \*-------------------------------------*/
66
67 };
68
69 #endif
70
71
72 /*----------------------------------------------------------------------*\
73 |* End *|
74 \*---------------------------------------------------------------------*/