-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython_compact5.py
More file actions
32 lines (27 loc) · 805 Bytes
/
Copy pathpython_compact5.py
File metadata and controls
32 lines (27 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
''' python_compact5.py '''
#include "util.py"
#include "undirected_graph.py"
#include "fullerenes.py"
#include "python_compact5.yp"
def _main(argc, argv):
sel = argv[1] if argc > 1 else "../graphs/10.a"
_
L = parse2file(sel)
_
G = from_adjacency_list(L)
_
for (v, l) in enumerate(L):
for (j, w) in enumerate(l):
assert w == opposite(G, v, G.V[v][j])
_
assert is_embedding(G)
_
compact5_traversal(G, compact5_traversal_visitor())
_
assert max_degree(G) <= 5
_
print("identical vertex ordering in adjacency list and graph verified")
print("is_embedding(" + str(sel) + ") verified, has " + str(n_faces_planar(G)) + " faces")
print("compat5_traversal(G, {}) done")
print("maxdegree(G) <=5 verified")
_summary()