From 634066313810b6b19ce7f4248b4f39b662c4f6ce Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Thu, 15 Nov 2018 21:57:10 -0500 Subject: Silence debug messages --- main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 01173e8..687bef5 100644 --- a/main.cpp +++ b/main.cpp @@ -271,9 +271,6 @@ void erase_edges(map &graph, int id_a, int id_b) /* *it is modified to point to next element */ void erase_node(map &graph, map::iterator &it) { - if(verbose) - cerr << "Pruning node " << it->first << endl; - node &n = it->second; for(int i = 0; i < n.neighbors.size(); i++) @@ -312,7 +309,8 @@ void prune(map &graph, int s, int t) /* see if there's a path from this node to S */ if(count_paths(graph, id, s, visited) == 0) { - cerr << "Pruning node " << id << ": no path to S without T" << endl; + if(verbose) + cerr << "Pruning node " << id << ": no path to S without T" << endl; erase_node(graph, it); @@ -330,7 +328,8 @@ void prune(map &graph, int s, int t) /* see if there's a path from this node to T */ if(count_paths(graph, id, t, visited) == 0) { - cerr << "Pruning node " << id << ": no path to T without S" << endl; + if(verbose) + cerr << "Pruning node " << id << ": no path to T without S" << endl; erase_node(graph, it); @@ -345,7 +344,8 @@ void prune(map &graph, int s, int t) if(neighbors == 0 || (neighbors == 1 && it->second.neighbors[0].id != s)) { - cerr << "Pruning node " << id << ": zero or one connection" << endl; + if(verbose) + cerr << "Pruning node " << id << ": zero or one connection" << endl; erase_node(graph, it); if(dumponprogress) -- cgit v1.1