[mlpack-svn] r10913 - mlpack/tags/mlpack-1.0.0/src/mlpack/core/math

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Tue Dec 20 20:12:20 EST 2011


Author: rcurtin
Date: 2011-12-20 20:12:19 -0500 (Tue, 20 Dec 2011)
New Revision: 10913

Modified:
   mlpack/tags/mlpack-1.0.0/src/mlpack/core/math/random.hpp
Log:
Random fixes for >= Boost 1.47.


Modified: mlpack/tags/mlpack-1.0.0/src/mlpack/core/math/random.hpp
===================================================================
--- mlpack/tags/mlpack-1.0.0/src/mlpack/core/math/random.hpp	2011-12-21 01:11:36 UTC (rev 10912)
+++ mlpack/tags/mlpack-1.0.0/src/mlpack/core/math/random.hpp	2011-12-21 01:12:19 UTC (rev 10913)
@@ -22,7 +22,7 @@
   // Global random object.
   extern boost::random::mt19937 randGen;
   // Global uniform distribution.
-  extern boost::random::uniform_01 randUniformDist;
+  extern boost::random::uniform_01<> randUniformDist;
 #else
   // Global random object.
   extern boost::mt19937 randGen;
@@ -44,7 +44,7 @@
 inline double Random(double lo, double hi)
 {
   #if BOOST_VERSION >= 104700
-    boost::random::uniform_real_distribution dist(lo, hi);
+    boost::random::uniform_real_distribution<> dist(lo, hi);
   #else
     boost::uniform_real<> dist(lo, hi);
   #endif
@@ -58,7 +58,7 @@
 inline int RandInt(int hiExclusive)
 {
   #if BOOST_VERSION >= 104700
-    boost::random::uniform_int_distribution dist(0, hiExclusive - 1);
+    boost::random::uniform_int_distribution<> dist(0, hiExclusive - 1);
   #else
     boost::uniform_int<> dist(0, hiExclusive - 1);
   #endif
@@ -72,7 +72,7 @@
 inline int RandInt(int lo, int hiExclusive)
 {
   #if BOOST_VERSION >= 104700
-    boost::random::uniform_int_distribution dist(lo, hiExclusive - 1);
+    boost::random::uniform_int_distribution<> dist(lo, hiExclusive - 1);
   #else
     boost::uniform_int<> dist(0, hiExclusive - 1);
   #endif




More information about the mlpack-svn mailing list