Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / BilatTools_CPP / src / core / tools / header / AleaTools.h
diff --git a/WCudaMSE/BilatTools_CPP/src/core/tools/header/AleaTools.h b/WCudaMSE/BilatTools_CPP/src/core/tools/header/AleaTools.h
new file mode 100755 (executable)
index 0000000..4420132
--- /dev/null
@@ -0,0 +1,74 @@
+#ifndef ALEATOOLS_H_\r
+#define ALEATOOLS_H_\r
+\r
+#include <cstdlib>\r
+#include <time.h>\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |*                    Declaration                                     *|\r
+ \*---------------------------------------------------------------------*/\r
+\r
+\r
+/**\r
+ * Not thread safe, see OpenpTools to obtian random number with parrallel thread\r
+ */\r
+class AleaTools\r
+    {\r
+    public:\r
+\r
+       /*--------------------------------------*\\r
+        |*             Constructor             *|\r
+        \*-------------------------------------*/\r
+\r
+       /**\r
+        * practice srand(time(NULL));\r
+        */\r
+       AleaTools();\r
+\r
+       /*--------------------------------------*\\r
+        |*             Destructor              *|\r
+        \*-------------------------------------*/\r
+\r
+       virtual ~AleaTools();\r
+\r
+       /*--------------------------------------*\\r
+        |*             Methodes                *|\r
+        \*-------------------------------------*/\r
+\r
+       /**\r
+        * in [a,b]\r
+        * Attention : pas thread safe\r
+        */\r
+       double uniformeAB(double a,double b);\r
+\r
+       /**\r
+        * in [0,1]\r
+        * Attention : pas thread safe\r
+        */\r
+       double uniforme01(void);\r
+\r
+       /**\r
+        * in [a,b]\r
+        * Attention : pas thread safe\r
+        */\r
+       int uniformeAB(int a,int b);\r
+\r
+\r
+    private:\r
+\r
+       /*--------------------------------------*\\r
+       |*              Methodes                *|\r
+        \*-------------------------------------*/\r
+\r
+       /*--------------------------------------*\\r
+       |*              Attributs               *|\r
+        \*-------------------------------------*/\r
+\r
+    };\r
+\r
+#endif\r
+\r
+\r
+/*----------------------------------------------------------------------*\\r
+ |*                    End                                             *|\r
+ \*---------------------------------------------------------------------*/\r