[mlpack-git] master: use a better starting point than all ones (7943b10)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:09:55 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit 7943b10bb54c882accc4e1aaabe9bd8e0e5d085c
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
>---------------------------------------------------------------
7943b10bb54c882accc4e1aaabe9bd8e0e5d085c
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