-
Notifications
You must be signed in to change notification settings - Fork 0
/
analyze.py
35 lines (27 loc) · 933 Bytes
/
analyze.py
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
33
34
35
by_poly = {}
by_jpoly = {}
num_knots = 0
fname = "2022-06-23-knots-unoriented.txt"
#fname = "out.txt"
with open(fname) as fin:
for name in fin:
num_knots += 1
assert next(fin) == "arrow\n"
poly1 = next(fin)
poly2 = next(fin)
key = poly1 + poly2
by_poly.setdefault(key, []).append(name)
assert next(fin) == "jones\n"
jpoly1 = next(fin)
jpoly2 = next(fin)
key = jpoly1 + jpoly2
by_jpoly.setdefault(key, []).append(name)
print(f"Loaded {num_knots} knots; {len(by_poly)} different arrow polynomials; {len(by_jpoly)} different jones polynomials")
print("arrow polynomial nonuniques")
for key, knots in by_poly.items():
if len(knots) > 1 :
print("nonunique class: " + repr(knots))
print("jones polynomial nonuniques")
for key, knots in by_jpoly.items():
if len(knots) > 1 :
print("nonunique class: " + repr(knots))