#19422: A new structure for Punctured Codes
-------------------------------------+-------------------------------------
Reporter: dlucas | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.2
Component: coding theory | Resolution:
Keywords: | Merged in:
Authors: David Lucas | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/dlucas/punctured_codes | 69da167f0a9d4a0fc68e0846416577a5ddb44eba
Dependencies: #19653 | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by jlavauzelle):
I start the review even though the ticket is not updated to the latest
beta. Despite my comments, note that I realize that building this
framework must have been a huge work, and that I found it really user-
friendly =)
*** General remarks ***
* As I read the (quite long) name of the canonical decoder of your
punctured code (`PuncturedCodeOriginalCodeDecoder`), I asked myself the
following question: if I understand well your naming convention, decoders
are named `Code`+`DecoderName`. Is it necessary to have the `Code` suffix
? My point is that it could be sufficient to only keep `DecoderName`,
because if a user wants to know what kind of code the decoder is applied
to, he just needs to call `Dec.code()`.
* You consider puncturing points as a list. Would it be better (and more
confortable to compute unions and intersections) to consider them a set ?
*** index.rst ***
* why do you remove `sage/coding/source_coding/huffman` ?
*** src/sage/coding/grs.py ***
* The method `_punctured_form(self, points)` doesn't work if `points` is
not sorted (e.g. `C_grs._punctured_form([4,3])`). That's due to your
strange way to select the evaluation points and multipliers. I think you
should remove the block:
{{{
start = 0
for i in points:
punctured_alphas += alphas[start:i]
punctured_col_mults += col_mults[start:i]
start = i + 1
punctured_alphas += alphas[start:n]
punctured_col_mults += col_mults[start:n]
}}}
and replace it by something like (that's only a suggestion):
{{{
punctured_alphas = [ alphas[i] for i in range(n) if i not in points ]
punctured_col_mults = [ col_mults[i] for i in range(n) if i not in points
]
}}}
* In the same method, if I understand it well, this block:
{{{
if G.rank() != dimension:
G = G.echelon_form()
for i in range(dimension):
if G[i] == 0:
dimension -= 1
}}}
aims at computing the code dimension (stored in `dimension`). In fact, you
already computed it in `G.rank()`.
*** src/sage/coding/linear_code.py ***
* in `_punctured_form` method, `G.echelon_form()` puts all the zero lines
at the bottom of the new matrix. Thus, if you want to get the non-zero
part of the matrix, I think you could simply write
{{{
k = G.rank()
return LinearCode(G[:k])
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/19422#comment:20>
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.