#19422: A new structure for Punctured Codes
-------------------------------------+-------------------------------------
       Reporter:  dlucas             |        Owner:
           Type:  enhancement        |       Status:  needs_work
       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_code            |  36e71c57401929089bc1938aa016b251b54f8916
   Dependencies:  #19653             |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by jlavauzelle):

 * status:  needs_review => needs_work


Comment:

 Hi David,

 A few remarks -- the last ones, I hope:


 - in `structured_representation` method: it doesn't work when one
 concatenates puncturings. For example, the following script
 {{{
     C = codes.GeneralizedReedSolomonCode(GF(7).list(), 4)
     P = codes.PuncturedCode(C, [0,6])
     D = P.structured_representation()
     P2 = codes.PuncturedCode(P, [0,4])
     D2 = P2.structured_representation()
 }}}
 fails at fifth line (so double puncturing actually works, only
 `structured_representation` crashes). From the crash log, it seems that
 you don't build the right set of `pts`.

 - in `PuncturedCodePuncturedMatrixEncoder`, one can construct this encoder
 while passing as argument a code which is not a punctured one. As a direct
 consequence, this scripts fails:
 {{{
     C = codes.GeneralizedReedSolomonCode(GF(7).list(), 4)
     E = codes.encoders.PuncturedCodePuncturedMatrixEncoder(C)
     G = E.generator_matrix()
 }}}
 The question is: is it the user's mistake, or should the code handle it ?
 Maybe it's reasonable to throw an error.


 - same remark for your decoder: one can pass a non-punctured code as
 parameter.

 - in `__init__` function of `PuncturedCodeOriginalCodeDecoder`, maybe it
 is better to use `True/False` boolean values instead of `error_erasure =
 0` and `error_erasure = 1`.

 - I also prefer the compact notation:
 {{{
     e_list = [ one if i in pts else zero for i in range(Cor.length()) ]
 }}}
 instead of:
 {{{
     e_list = []
     for i in range(Cor.length()):
         if i in pts:
             e_list.append(one)
         else:
             e_list.append(zero)
 }}}


 - finally, a typo, l.441 : default instead of dafault

 I did not perform exhaustive tests of all the combinations of
 codes/encoders/decoders/strategies, because it is too long. So given the
 complexity of the feature you're trying to implement, it's still possible
 there remains some minor errors -- especially with extreme settings -- but
 maybe a real deep use of this class (by actual users) could make them
 appear more easily.

 Thus, when you're done fixing the previous errors, I give the green light.

 Julien

--
Ticket URL: <http://trac.sagemath.org/ticket/19422#comment:34>
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.

Reply via email to