- now only nonzero entries of the D matrix are output to MPS-files

This commit is contained in:
Kaspar Fischer 2006-02-28 12:21:11 +00:00
parent 6542afbf6b
commit d7691f1dd6
1 changed files with 2 additions and 1 deletions

View File

@ -895,7 +895,8 @@ void write_MPS(std::ostream& out,
out << "QMATRIX\n";
for (int i=0; i<n; ++i)
for (int j=0; j<n; ++j)
out << " x" << i << " x" << j << " " << 2*D[i][j] << "\n";
if (!CGAL::is_zero(D[i][j]))
out << " x" << i << " x" << j << " " << 2*D[i][j] << "\n";
}
// output end: