mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-14 00:58:23 -05:00
12 lines
176 B
Python
12 lines
176 B
Python
F = GF(11)
|
|
K.<x> = F[]
|
|
n, k = 10 , 5
|
|
|
|
C = codes.GeneralizedReedSolomonCode(F.list()[:n], k)
|
|
E = C.encoder("EvaluationPolynomial")
|
|
|
|
f = x^2 + 3*x + 10
|
|
c = E.encode(f)
|
|
print(c)
|
|
|