Commit 0919f68c authored by yvonneanne's avatar yvonneanne

extend init

parent 7e993140
......@@ -28,6 +28,8 @@ def init_k_graph(k, n):
for (u, v) in g.edges():
g[u][v]['arb'] = -1
g.graph['k'] = k
if 'root' not in g.graph.keys():
g.graph['root'] = 0 #set root node to be 0
return g
# reset the arb attribute for all edges to -1, i.e., no arborescence assigned yet
......@@ -887,4 +889,4 @@ def round_robin(g, cut=False, swap=False, reset=True):
index = (index + 1) % K
swappy.append(swaps)
g = n.g
return get_arborescence_list(g)
\ No newline at end of file
return get_arborescence_list(g)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment