#19422: A new structure for Punctured Codes
-------------------------------------+-------------------------------------
Reporter: dlucas | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.3
Component: coding theory | Resolution:
Keywords: | Merged in:
Authors: David Lucas | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/dlucas/punctured_code | 8a3a084f960197006447424522ea768c4a89bb62
Dependencies: #19653 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jlavauzelle):
Hi David,
Your fix of `structured_representation` doesn't work. Try this:
{{{
C = codes.GeneralizedReedSolomonCode(GF(7).list(), 4)
Cp = codes.PuncturedCode(C, [5,6])
Cp2 = codes.PuncturedCode(Cp, [1,2])
}}}
If you print `list_pts` at the end of the method, you'll see it is not
`[1,2,5,6]` as expected.
Here is a piece of code which should work:
{{{
while(isinstance(C, PuncturedCode)):
cur_pts = list(C.punctured_positions())
list_len = len(list_pts)
for p in cur_pts:
for i in range(list_len):
if (p <= list_pts[i]):
list_pts[i] += 1
list_pts += cur_pts
C = C.original_code()
return C._punctured_form(set(list_pts))
}}}
I'm not satisfied about its algorithmic complexity, so you're free to
improve it, even though I cannot believe that this piece of code will ever
become a bottleneck of any algorithm.
I agree with the other fixes :)
Julien
--
Ticket URL: <http://trac.sagemath.org/ticket/19422#comment:38>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.