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

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Thu Jan 19 11:55:27 EST 2012


Author: rcurtin
Date: 2012-01-19 11:55:27 -0500 (Thu, 19 Jan 2012)
New Revision: 11169

Modified:
   mlpack/trunk/src/mlpack/core/math/random.hpp
Log:
Set the standard seed (srand()) also, because Armadillo is likely to use that,
and in places we use .randn() or .randu().


Modified: mlpack/trunk/src/mlpack/core/math/random.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/math/random.hpp	2012-01-19 16:44:29 UTC (rev 11168)
+++ mlpack/trunk/src/mlpack/core/math/random.hpp	2012-01-19 16:55:27 UTC (rev 11169)
@@ -40,6 +40,7 @@
 inline void RandomSeed(const size_t seed)
 {
   randGen.seed((uint32_t) seed);
+  srand((unsigned int) seed);
 }
 
 /**




More information about the mlpack-svn mailing list