Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Radek Hušek
group-connectivity-pub
Commits
22f298af
Commit
22f298af
authored
Feb 15, 2017
by
Radek Hušek
Browse files
groupConnectivityNaive.py: add prettifyGraph
parent
67a38da0
Changes
1
Hide whitespace changes
Inline
Side-by-side
groupConnectivityNaive.py
View file @
22f298af
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
):
"""Enumerate all flows of given graph.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment