Revert "older versions of arma do not support unary minus on sparse matrices"

This reverts commit a8ecf093989cbe3d58c36c4e21e772c99d7856e4.
This commit is contained in:
Ryan Curtin
2015-02-06 15:56:05 -05:00
parent cc6199a55e
commit ea795f1dee
+1 -3
View File
@@ -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);