Skip to content

Commit

Permalink
Remove dot output of separate cycles
Browse files Browse the repository at this point in the history
The cycles should be included into the final graph.

Issue #10.
  • Loading branch information
rakhimov committed Nov 3, 2016
1 parent c931a56 commit 24b73c8
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,16 +415,6 @@ def _print_ccd(digraph, cycles, layers, size_graph):
(ccd, acd, nccd))


def _dot_cycles(digraph, cycles, dot_basename):
if cycles and dot_basename:
if cycles:
cycle_graph = nx.DiGraph()
for cycle in cycles.values():
cycle_graph.add_edges_from(cycle.edges_iter())
write_dot(cycle_graph, dot_basename + '_cycles.dot')
write_dot(digraph, dot_basename + '_final.dot')


def calculate_graph(digraph, dot_basename=None):
size_graph = digraph.number_of_nodes()
if size_graph == 0:
Expand All @@ -436,4 +426,5 @@ def calculate_graph(digraph, dot_basename=None):
_print_cycles(cycles)
_print_layers(layers, node2cycle, digraph)
_print_ccd(digraph, cycles, layers, size_graph)
_dot_cycles(digraph, cycles, dot_basename)
if dot_basename:
write_dot(digraph, dot_basename + '.dot')

0 comments on commit 24b73c8

Please sign in to comment.