#19463: A coding/two_weight_db module
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.10
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:
  coding theory          |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  73930f28c0d15ac1cbe1b6fd2741817608dec0ec
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/ncohen/19463         |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by jsrn):

 Replying to [comment:4 vdelecroix]:
 > Isn't there a simpler way of getting the set of weights than
 > {{{
 > _,w1,w2 = sorted(set([x.hamming_weight() for x in LinearCode(M)]))
 > }}}
 > You are going through the whole set of vectors! But I admit that the
 module is not imported on sage startup.
 >
 > One possibility: hard code the values + add a (long) doctest that checks
 that these values are indeed correct?

 I was thinking that it would be nice to refactor the DB by creating a
 class `TwoWeightCode`; a two-weight code has, after all, rather special
 properties and certain properties could be computed much faster for it.

 I would give this class a flag at construction time `verify = True`. When
 this is true, it computes the weight distribution and verifies the code is
 two-weight. When it is false, the code is assumed two-weight: the two
 weights could either be given to the constructor, or they could be
 inferred very easily by running through the code until two distinct
 weights had been encountered. This can be expected to happen very quickly.
 A long test could then run a `verify_is_two_weight` in the codes or
 something.

 Johan

--
Ticket URL: <http://trac.sagemath.org/ticket/19463#comment:9>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to