[mlpack-git] master: Revert "older versions of arma do not support unary minus on sparse matrices" (64819bd)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Fri Feb 6 16:19:04 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/5b8b88c95e161efd977709c303861b9c3b88feb2...dd5d265ac1897b96cc7e98778557a1361415d509
>---------------------------------------------------------------
commit 64819bd0b9ba64322980f87c058aaaa7de3af672
Author: Ryan Curtin <ryan at ratml.org>
Date: Fri Feb 6 15:56:05 2015 -0500
Revert "older versions of arma do not support unary minus on sparse matrices"
This reverts commit a8ecf093989cbe3d58c36c4e21e772c99d7856e4.
>---------------------------------------------------------------
64819bd0b9ba64322980f87c058aaaa7de3af672
src/mlpack/tests/sdp_primal_dual_test.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/mlpack/tests/sdp_primal_dual_test.cpp b/src/mlpack/tests/sdp_primal_dual_test.cpp
index 1136fd9..35651fb 100644
--- a/src/mlpack/tests/sdp_primal_dual_test.cpp
+++ b/src/mlpack/tests/sdp_primal_dual_test.cpp
@@ -157,9 +157,7 @@ ConstructMaxCutSDPFromLaplacian(const std::string& laplacianFilename)
if (laplacian.n_rows != laplacian.n_cols)
Log::Fatal << "laplacian not square" << std::endl;
SDP<arma::sp_mat> sdp(laplacian.n_rows, laplacian.n_rows, 0);
- // operator- not supported on older versions of arma
- sdp.C() = arma::sp_mat(laplacian);
- sdp.C() *= -1.;
+ sdp.C() = -arma::sp_mat(laplacian);
for (size_t i = 0; i < laplacian.n_rows; i++)
{
sdp.SparseA()[i].zeros(laplacian.n_rows, laplacian.n_rows);
More information about the mlpack-git
mailing list