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

add cube.sage

parent 8159ab03
No related branches found
No related tags found
No related merge requests found
# 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')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment