aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-11-15 21:57:10 -0500
committerFranklin Wei <me@fwei.tk>2018-11-15 21:57:10 -0500
commit634066313810b6b19ce7f4248b4f39b662c4f6ce (patch)
treeb8f7a91489e08cecc72f47afd5d89240ff72b162
parente7b25fdad653cebdc4356919803514c3234723b2 (diff)
downloadcircgraph-634066313810b6b19ce7f4248b4f39b662c4f6ce.zip
circgraph-634066313810b6b19ce7f4248b4f39b662c4f6ce.tar.gz
circgraph-634066313810b6b19ce7f4248b4f39b662c4f6ce.tar.bz2
circgraph-634066313810b6b19ce7f4248b4f39b662c4f6ce.tar.xz
Silence debug messages
-rw-r--r--main.cpp12
1 files changed, 6 insertions, 6 deletions
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<int, node> &graph, int id_a, int id_b)
/* *it is modified to point to next element */
void erase_node(map<int, node> &graph, map<int, node>::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<int, node> &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<int, node> &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<int, node> &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)