Skip to content

Commit

Permalink
Update Matrix_Blocking.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
paolosyloslabini committed Mar 14, 2024
1 parent 99cdaab commit 1980d20
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/general/Matrix_Blocking.cpp
Expand Up @@ -15,8 +15,9 @@ int main(int argc, char* argv[])
if (cli.verbose_ > 1) cmat.print(cli.verbose_);
BlockingEngine bEngine(cli);


//evaluate the grouping
bEngine.GetGrouping(cmat);
vector<intT> grouping = bEngine.GetGrouping(cmat);
if (cli.verbose_ > 0) bEngine.print();

ofstream outfile;
Expand All @@ -35,5 +36,12 @@ int main(int argc, char* argv[])
save_blocking_data(cout, cli, bEngine, cmat, false, outfile_grouping);
}

bool save_reordered_matrix = true;
if (save_reordered_matrix) {
cmat.reorder(grouping);
outfile.open(cli.outfile_ + "_reordered.el");
cmat.save_to_edgelist(outfile, " ", true, 0);
}

if (cli.verbose_> 0) cout << "Nonzero Blocks:" << bEngine.VBR_nzblocks_count << endl;
}

0 comments on commit 1980d20

Please sign in to comment.