rssage.sage 176 B

1234567891011
  1. F = GF(11)
  2. K.<x> = F[]
  3. n, k = 10 , 5
  4. C = codes.GeneralizedReedSolomonCode(F.list()[:n], k)
  5. E = C.encoder("EvaluationPolynomial")
  6. f = x^2 + 3*x + 10
  7. c = E.encode(f)
  8. print(c)