-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
43 lines (40 loc) · 1.43 KB
/
test.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
36
37
38
39
40
41
42
43
from comptables import *
import operator
'''
rcc = {}
rcc["!"] = 1 << 0 1
rcc["<"] = 1 << 1 2
rcc["="] = 1 << 2 4
rcc[">"] = 1 << 3 8
rcc["o"] = 1 << 4 16
rcc["!<"] = 1 << 0 | 1 << 1 3
rcc["!="] = 1 << 0 | 1 << 2 5
rcc["!>"] = 1 << 0 | 1 << 3 9
rcc["!o"] = 1 << 0 | 1 << 4 17
rcc["<="] = 1 << 1 | 1 << 2 6
rcc["<>"] = 1 << 1 | 1 << 3 10
rcc["<o"] = 1 << 1 | 1 << 4 18
rcc["=>"] = 1 << 2 | 1 << 3 12
rcc["=o"] = 1 << 2 | 1 << 4 20
rcc[">o"] = 1 << 3 | 1 << 4 24
rcc["!<="] = 1 << 0 | 1 << 1 | 1 << 2 7
rcc["!<>"] = 1 << 0 | 1 << 1 | 1 << 3 11
rcc["!<o"] = 1 << 0 | 1 << 1 | 1 << 4 19
rcc["!=>"] = 1 << 0 | 1 << 2 | 1 << 3 13
rcc["!=o"] = 1 << 0 | 1 << 2 | 1 << 4 21
rcc["!>o"] = 1 << 0 | 1 << 3 | 1 << 4 25
rcc["<=>"] = 1 << 1 | 1 << 2 | 1 << 3 14
rcc["<=o"] = 1 << 1 | 1 << 2 | 1 << 4 22
rcc["<>o"] = 1 << 1 | 1 << 3 | 1 << 4 26
rcc["=>o"] = 1 << 2 | 1 << 3 | 1 << 4 28
rcc["!<=>"] = 1 << 0 | 1 << 1 | 1 << 2 | 1 << 3 15
rcc["!<=o"] = 1 << 0 | 1 << 1 | 1 << 2 | 1 << 4 23
rcc["!<>o"] = 1 << 0 | 1 << 1 | 1 << 3 | 1 << 4 27
rcc["!=>o"] = 1 << 0 | 1 << 2 | 1 << 3 | 1 << 4 29
rcc["<=>o"] = 1 << 1 | 1 << 2 | 1 << 3 | 1 << 4 30
rcc["!<=>o"] = 1 << 0 | 1 << 1 | 1 << 2 | 1 << 3 | 1 << 4 31
'''
for k1,v1 in rcc.iteritems():
for k2,v2 in rcc.iteritems():
value = r32compTab(rcc[k1], rcc[k2])
print 'comptab[' + str(v1) + '][' + str(v2) + '] =', value