#19623: Syndrome decoder is not a syndrome decoder
-------------------------------------+-------------------------------------
       Reporter:  dlucas             |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.0
      Component:  coding theory      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  David Lucas        |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/dlucas/generic_decoders          |  fc79446d6948143d32a9065410453379c79ef2b2
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by dlucas):

 I fixed a few bugs:

 - the check related to lexicographic order in `_build_lookup_table` was
 wrong, as it ignored the weight of the vectors. Now the vector with the
 smallest weight is kept, and if both vectors have the same weight, the
 smallest in lexicographic order is kept.
 - I added an early termination condition on the loop to fill the table,
 which triggers if no vector was added to the table during a full
 iteration.
 - I also added an early termination to `decode_to_code`: if received
 vector's syndrome equals to zero, it does not contain any error and thus
 can be returned as is.
 - Finally, I added checks over the input, especially, it is no longer
 possible to take `number_errors` > `code.length()`.

 This is still open for review,

 David

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