From 2ea78217d87b4403845ecf328bdf6eb640462196 Mon Sep 17 00:00:00 2001
From: Manuel Guenther <manuel.guenther@idiap.ch>
Date: Fri, 12 Sep 2014 15:16:50 +0200
Subject: [PATCH] Removed superflouos bindings to old random functions.

---
 bob/learn/misc/old/main.cc   |  2 --
 bob/learn/misc/old/random.cc | 39 ------------------------------------
 setup.py                     |  1 -
 3 files changed, 42 deletions(-)
 delete mode 100644 bob/learn/misc/old/random.cc

diff --git a/bob/learn/misc/old/main.cc b/bob/learn/misc/old/main.cc
index 593957e..c8a4834 100644
--- a/bob/learn/misc/old/main.cc
+++ b/bob/learn/misc/old/main.cc
@@ -22,7 +22,6 @@
 void bind_core_tinyvector();
 void bind_core_ndarray_numpy();
 void bind_core_bz_numpy();
-void bind_core_random();
 
 /** machine bindings **/
 void bind_machine_base();
@@ -75,7 +74,6 @@ BOOST_PYTHON_MODULE(_old_library) {
   bind_core_tinyvector();
   bind_core_ndarray_numpy();
   bind_core_bz_numpy();
-  bind_core_random();
 
   /** machine bindings **/
   bind_machine_base();
diff --git a/bob/learn/misc/old/random.cc b/bob/learn/misc/old/random.cc
deleted file mode 100644
index 35ada51..0000000
--- a/bob/learn/misc/old/random.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * @author Andre Anjos <andre.anjos@idiap.ch>
- * @author Laurent El Shafey <laurent.el-shafey@idiap.ch>
- * @date Mon Jul 11 18:31:22 2011 +0200
- *
- * @brief Bindings for random number generation.
- *
- * Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
- */
-
-#include "ndarray.h"
-#include <boost/make_shared.hpp>
-#include <boost/random.hpp>
-
-using namespace boost::python;
-
-template <typename T>
-static boost::shared_ptr<boost::mt19937> make_with_seed(T s) {
-  return boost::make_shared<boost::mt19937>(s);
-}
-
-template <typename T>
-static void set_seed(boost::mt19937& o, T s) {
-  o.seed(s);
-}
-
-void bind_core_random () {
-  class_<boost::mt19937, boost::shared_ptr<boost::mt19937> >("mt19937",
-      "A Mersenne-Twister Random Number Generator (RNG)\n" \
-      "\n" \
-      "A Random Number Generator (RNG) based on the work 'Mersenne Twister: A 623-dimensionally equidistributed uniform pseudo-random number generator, Makoto Matsumoto and Takuji Nishimura, ACM Transactions on Modeling and Computer Simulation: Special Issue on Uniform Random Number Generation, Vol. 8, No. 1, January 1998, pp. 3-30'", init<>((arg("self")), "Default constructor"))
-    .def("__init__", make_constructor(&make_with_seed<int64_t>, default_call_policies(), (arg("seed"))), "Builds a new generator with a specific seed")
-    .def("__init__", make_constructor(&make_with_seed<double>, default_call_policies(), (arg("seed"))), "Builds a new generator with a specific seed")
-    .def("seed", &set_seed<double>, (arg("self"), arg("seed")), "Sets my internal seed using a floating-point number")
-    .def("seed", &set_seed<int64_t>, (arg("self"), arg("seed")), "Sets my internal seed using an integer")
-    .def(self == self)
-    .def(self != self)
-    ;
-}
diff --git a/setup.py b/setup.py
index dec74d2..fa3cf02 100644
--- a/setup.py
+++ b/setup.py
@@ -133,7 +133,6 @@ setup(
           "bob/learn/misc/old/ndarray.cc",
           "bob/learn/misc/old/ndarray_numpy.cc",
           "bob/learn/misc/old/tinyvector.cc",
-          "bob/learn/misc/old/random.cc",
 
           "bob/learn/misc/old/main.cc",
         ],
-- 
GitLab