Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Also defined this shortcut in GRSEvaluationPolynomialEncoder
Browse files Browse the repository at this point in the history
  • Loading branch information
David Lucas committed Feb 22, 2016
1 parent 02c1f6d commit 49c4488
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/sage/coding/grs.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,10 @@ def encode(self, p):
r"""
Transforms the polynomial ``p`` into a codeword of :meth:`code`.
One can use the following shortcut to encode a word with an encoder ``E``::
E(word)
INPUT:
- ``p`` -- A polynomial from the message space of ``self`` of degree
Expand Down Expand Up @@ -708,6 +712,9 @@ def encode(self, p):
c = vector(C.base_ring(), [col_mults[i]*p(alphas[i]) for i in range(C.length())])
return c

#Alias for encode method
__call__ = encode

def unencode_nocheck(self, c):
r"""
Returns the message corresponding to the codeword ``c``.
Expand Down

0 comments on commit 49c4488

Please sign in to comment.