Skip to content
Snippets Groups Projects
Commit 22f298af authored by Radek Hušek's avatar Radek Hušek
Browse files

groupConnectivityNaive.py: add prettifyGraph

parent 67a38da0
No related branches found
No related tags found
No related merge requests found
from sage.graphs.graph import Graph, DiGraph from sage.graphs.graph import Graph, DiGraph
def prettifyGraph(G_):
"""Convert graph into directed one and number its edges."""
E = [ (u, v, i) for i, (u, v, _) in enumerate(G_.edges()) ]
return DiGraph([G_.vertices(), E], format='vertices_and_edges')
def flowEnumerator(G, group): def flowEnumerator(G, group):
"""Enumerate all flows of given graph. """Enumerate all flows of given graph.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment