[mlpack-svn] r11143 - mlpack/trunk/src/mlpack/core/math
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Jan 18 14:22:39 EST 2012
Author: rcurtin
Date: 2012-01-18 14:22:39 -0500 (Wed, 18 Jan 2012)
New Revision: 11143
Modified:
mlpack/trunk/src/mlpack/core/math/random.hpp
Log:
Use uint32_t because that's what the class uses internally.
Modified: mlpack/trunk/src/mlpack/core/math/random.hpp
===================================================================
--- mlpack/trunk/src/mlpack/core/math/random.hpp 2012-01-18 19:07:01 UTC (rev 11142)
+++ mlpack/trunk/src/mlpack/core/math/random.hpp 2012-01-18 19:22:39 UTC (rev 11143)
@@ -32,12 +32,14 @@
/**
* Set the random seed used by the random functions (Random() and RandInt()).
+ * The seed is casted to a 32-bit integer before being given to the random
+ * number generator, but a size_t is taken as a parameter for API consistency.
*
* @param seed Seed for the random number generator.
*/
inline void RandomSeed(const size_t seed)
{
- randGen.seed(seed);
+ randGen.seed((uint32_t) seed);
}
/**
More information about the mlpack-svn
mailing list