Add class definition
This commit is contained in:
commit
472f422296
15
main.py
Normal file
15
main.py
Normal 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))
|
Loading…
Reference in New Issue
Block a user