[mlpack-svn] r15870 - mlpack/trunk/src/mlpack/tests

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Mon Sep 30 13:41:04 EDT 2013


Author: marcus
Date: Mon Sep 30 13:41:03 2013
New Revision: 15870

Log:
Fix ambiguous call to RandomSeed, to pass the test with clang.

Modified:
   mlpack/trunk/src/mlpack/tests/nmf_test.cpp

Modified: mlpack/trunk/src/mlpack/tests/nmf_test.cpp
==============================================================================
--- mlpack/trunk/src/mlpack/tests/nmf_test.cpp	(original)
+++ mlpack/trunk/src/mlpack/tests/nmf_test.cpp	Mon Sep 30 13:41:03 2013
@@ -124,9 +124,9 @@
 
   // It seems to hit the iteration limit first.
   NMF<> nmf(10000, 1e-20);
-  math::RandomSeed(1000); // Set random seed so results are the same.
+  mlpack::math::RandomSeed(1000); // Set random seed so results are the same.
   nmf.Apply(v, r, w, h);
-  math::RandomSeed(1000);
+  mlpack::math::RandomSeed(1000);
   nmf.Apply(dv, r, dw, dh);
 
   // Make sure the results are about equal for the W and H matrices.
@@ -162,9 +162,9 @@
   size_t r = 16;
 
   NMF<RandomAcolInitialization<> > nmf;
-  math::RandomSeed(1000); // Set random seed so results are the same.
+  mlpack::math::RandomSeed(1000); // Set random seed so results are the same.
   nmf.Apply(v, r, w, h);
-  math::RandomSeed(1000);
+  mlpack::math::RandomSeed(1000);
   nmf.Apply(dv, r, dw, dh);
 
   // Make sure the results are about equal for the W and H matrices.
@@ -202,9 +202,9 @@
   NMF<RandomInitialization,
       WMultiplicativeDivergenceRule,
       HMultiplicativeDivergenceRule> nmf;
-  math::RandomSeed(10); // Set random seed so the results are the same.
+  mlpack::math::RandomSeed(10); // Set random seed so the results are the same.
   nmf.Apply(v, r, w, h);
-  math::RandomSeed(10);
+  mlpack::math::RandomSeed(10);
   nmf.Apply(dv, r, dw, dh);
 
   // Make sure the results are about equal for the W and H matrices.
@@ -242,9 +242,9 @@
   NMF<RandomInitialization,
       WAlternatingLeastSquaresRule,
       HAlternatingLeastSquaresRule> nmf;
-  math::RandomSeed(40);
+  mlpack::math::RandomSeed(40);
   nmf.Apply(v, r, w, h);
-  math::RandomSeed(40);
+  mlpack::math::RandomSeed(40);
   nmf.Apply(dv, r, dw, dh);
 
   // Make sure the results are about equal for the W and H matrices.



More information about the mlpack-svn mailing list