diff --git a/src/partition.cpp b/src/partition.cpp index 0216611..8e12e3d 100644 --- a/src/partition.cpp +++ b/src/partition.cpp @@ -394,7 +394,7 @@ int main(int argc, char** argv) wcs::Partition_Info pinfo(rnet_ptr); pinfo.scan(cfg.verbose); - pinfo.report(); + pinfo.report(cfg.dbglvl < 513); std::cout << "objval = " << objval << std::endl; diff --git a/src/partition/partition_info.cpp b/src/partition/partition_info.cpp index 7e91e68..c6c85ee 100644 --- a/src/partition/partition_info.cpp +++ b/src/partition/partition_info.cpp @@ -228,7 +228,8 @@ static void show_max_per_part( const MaxPerPart& mpp, const std::string& title, size_t nparts, - const Partition_Info::graph_t& g) + const Partition_Info::graph_t& g, + bool brief_max) { using std::operator<<; using namespace std; @@ -241,10 +242,16 @@ static void show_max_per_part( if (mx.first <= 0ul) { continue; } - const auto vt_str = Vertex::vt_str.at(static_cast(t+1)); - for (const auto& vd: mx.second) { - const auto v_label = g[vd].get_label(); - str += ' ' + vt_str + " <" + v_label + ", " + to_string(mx.first) + ">"; + const auto vt_str + = Vertex::vt_str.at(static_cast(t+1)); + if (brief_max) { + str += " <" + vt_str + ' ' + to_string(mx.first) + '>'; + } else { + for (const auto& vd: mx.second) { + const auto v_label = g[vd].get_label(); + str += ' ' + vt_str + + " <" + v_label + ", " + to_string(mx.first) + ">"; + } } } cout << str << endl; @@ -282,7 +289,7 @@ static void show_comm_volume_per_part( } } -void Partition_Info::report() const +void Partition_Info::report(bool brief_max) const { using std::operator<<; using namespace std; @@ -306,15 +313,15 @@ void Partition_Info::report() const std::cout << "--------------------------------------"; show_max_per_part(m_max_indegree, "\nMaximum of indegrees of local vertices:", - m_num_parts, g); + m_num_parts, g, brief_max); show_max_per_part(m_max_outdegree, "\nMaximum of outdegrees of local vertices:", - m_num_parts, g); + m_num_parts, g, brief_max); show_max_per_part(m_max_degree, "\nMaximum of degrees of local vertices:", - m_num_parts, g); + m_num_parts, g, brief_max); std::cout << "--------------------------------------"; show_sum_per_part(m_load, diff --git a/src/partition/partition_info.hpp b/src/partition/partition_info.hpp index 11e5d68..4197615 100644 --- a/src/partition/partition_info.hpp +++ b/src/partition/partition_info.hpp @@ -66,7 +66,7 @@ class Partition_Info void reset_num_partitions(); void scan(bool verbose = false); - void report() const; + void report(bool brief_max = false) const; protected: /// Network with partition info