Add class definition

This commit is contained in:
Varmen8 2018-06-26 02:05:11 +02:00
commit 472f422296

15
main.py Normal file
View File

@ -0,0 +1,15 @@
import itertools
class PolyIntField:
def __init__(self, int_modulo, poly_modulo):
self.int_modulo = int_modulo
self.poly_modulo = poly_modulo
self.elements = list(itertools.product([x for x in range(0, int_modulo)]
, repeat=len(poly_modulo) - 1))
if __name__ == "__main__":
a = PolyIntField(3, [1, 1, 2, 2])
print(a.elements)
print(len(a.elements))