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

Commit

Permalink
changed MPE to the trivial repeated calling of the evaluation functio…
Browse files Browse the repository at this point in the history
…n. added a todo block to the documentation.
  • Loading branch information
arpitdm committed Aug 8, 2016
1 parent 50f9bdd commit dd667ed
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions src/sage/rings/polynomial/skew_polynomial_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,13 @@ def multi_point_evaluation(self, p, eval_pts):
List of values of `p` at the `eval_pts`.
.. TODO::
This method currently trivially calls the evaluation function
repeatedly and should be updated to the recursive algorithm
from the paper "Fast Operations on Linearized Polynomials
and their Applications in Coding Theory" by Puchinger, et al.
EXAMPLES:
sage: k.<t> = GF(5^3)
Expand All @@ -792,22 +799,8 @@ def multi_point_evaluation(self, p, eval_pts):
sage: eval_pts = [1, t, t^2]
sage: c = S.multi_point_evaluation(a, eval_pts); c
[t + 1, 3*t^2 + 4*t + 4, 4*t]
sage: [ a(e) for e in eval_pts ]
[t + 1, 3*t^2 + 4*t + 4, 4*t]
"""
coefficients = p.list()
sigma = self.twist_map()
if len(eval_pts) == 1:
return [ p(eval_pts[0]) ]
else:
t = len(eval_pts)//2
A = eval_pts[:t]
B = eval_pts[t:]
M_A = self.minimal_vanishing_polynomial(A)
M_B = self.minimal_vanishing_polynomial(B)
Q_A, R_A = p.right_quo_rem(M_A)
Q_B, R_B = p.right_quo_rem(M_B)
return self.multi_point_evaluation(R_A, A) + self.multi_point_evaluation(R_B, B)
return [ p(e) for e in eval_pts ]

def interpolation_polynomial(self, eval_pts, values, check=True):
"""
Expand Down

0 comments on commit dd667ed

Please sign in to comment.