[mlpack-svn] master: use a better starting point than all ones (6977355)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Tue Jan 6 14:20:36 EST 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/6b14d78fc09cb205ffa7a297f5e6310b2ad83e25...9147fd3ee8072669c18422de4ea6fbe8f964b423

>---------------------------------------------------------------

commit 69773550f15a66e20ec3336dbd407b6657d151e5
Author: Stephen Tu <tu.stephenl at gmail.com>
Date:   Fri Jan 2 18:33:33 2015 -0800

    use a better starting point than all ones


>---------------------------------------------------------------

69773550f15a66e20ec3336dbd407b6657d151e5
 src/mlpack/tests/lrsdp_test.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mlpack/tests/lrsdp_test.cpp b/src/mlpack/tests/lrsdp_test.cpp
index 8c469b5..312efd7 100644
--- a/src/mlpack/tests/lrsdp_test.cpp
+++ b/src/mlpack/tests/lrsdp_test.cpp
@@ -155,8 +155,9 @@ BOOST_AUTO_TEST_CASE(ErdosRenyiRandomGraphMaxCutSDP)
   if (ceil(r) > laplacian.n_rows)
     r = laplacian.n_rows;
 
-  arma::mat coordinates(laplacian.n_rows, ceil(r));
-  coordinates.ones();
+  std::srand(0xDEADBEEF);
+  arma::mat coordinates = arma::randu<arma::mat>(laplacian.n_rows, ceil(r));
+  std::srand(std::time(nullptr));
 
   LRSDP maxcut(laplacian.n_rows, 0, coordinates);
   maxcut.SparseC() = laplacian;




More information about the mlpack-git mailing list