[mlpack-svn] r12466 - mlpack/trunk/src/mlpack/core/math

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Thu Apr 19 13:32:51 EDT 2012


Author: rcurtin
Date: 2012-04-19 13:32:51 -0400 (Thu, 19 Apr 2012)
New Revision: 12466

Modified:
   mlpack/trunk/src/mlpack/core/math/random.cpp
Log:
Handle Boost 1.33 Random library correctly.  I am not sure how far backwards
this fix extends.


Modified: mlpack/trunk/src/mlpack/core/math/random.cpp
===================================================================
--- mlpack/trunk/src/mlpack/core/math/random.cpp	2012-04-19 16:20:19 UTC (rev 12465)
+++ mlpack/trunk/src/mlpack/core/math/random.cpp	2012-04-19 17:32:51 UTC (rev 12466)
@@ -19,8 +19,15 @@
 #else
   // Global random object.
   boost::mt19937 randGen;
-  // Global uniform distribution.
-  boost::uniform_01<> randUniformDist;
+
+  #if BOOST_VERSION >= 103900
+    // Global uniform distribution.
+    boost::uniform_01<> randUniformDist;
+  #else
+    // Pre-1.39 Boost.Random did not give default template parameter values.
+    boost::uniform_01<double, double> randUniformDist;
+  #endif
+
   // Global normal distribution.
   boost::normal_distribution<> randNormalDist;
 #endif




More information about the mlpack-svn mailing list