From d05f03394b6a8c7ed6d35a7983f6c864741a3111 Mon Sep 17 00:00:00 2001 From: Antonio De Lucreziis Date: Mon, 28 Oct 2024 20:01:41 +0100 Subject: [PATCH] more compact --- examples/edge_classify_2.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/examples/edge_classify_2.py b/examples/edge_classify_2.py index 370bd4f..e198f6e 100644 --- a/examples/edge_classify_2.py +++ b/examples/edge_classify_2.py @@ -53,8 +53,6 @@ def classify_iter(g): ('node:start', u, None), ] - print("Stack:", continuations) - while len(continuations) > 0: state, u, more = continuations.pop() @@ -63,20 +61,16 @@ def classify_iter(g): parent = more - print("Recurse:", u, parent) - visited.add(u) t += 1 start_time[u] = t - if parent is not None: edges[(parent, u)] = 'tree' continuations.append(('node:neighbors', u, 0)) elif state == 'node:neighbors': i = more - print("Remaining Neighbors:", g.neighbors(u)[i:]) neighbors = g.neighbors(u)[i:] for i in range(len(neighbors)): @@ -97,11 +91,6 @@ def classify_iter(g): t += 1 finish_time[u] = t - print("Stack:", continuations) - - - - return edges # Graph structure