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
b6ad62ef
Commit
b6ad62ef
authored
Nov 09, 2017
by
Radek Hušek
Browse files
add cube.sage
parent
8159ab03
Changes
1
Hide whitespace changes
Inline
Side-by-side
cube.sage
0 → 100644
View file @
b6ad62ef
# generate a nice picture of subdivided cube
# which is Z_4 but not Z_2^2 connected
from groupConnectivityNaive import *
G = prettifyGraph(Graph('J?CSZ`GHC@_'))
G.set_pos({
7: [50,50], 1: [100,50], 8: [150,50], 10: [150,150], 9: [50,150], 2: [50,100],
3:[0,0], 4:[200,0], 6: [200,200], 5:[0, 200],
0: [175,175]
})
l = testGroupConnectivityNaive(G, Zkn(2,2), list_all = False)
def labeledGraph(G_, labels):
G = G_.copy()
for (u, v, i) in G.edges():
G.set_edge_label(u, v, labels[i])
return G
P = labeledGraph(G, l[2][0]).plot(edge_labels = True)
P.save('cube.pdf')
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