#18617: Implement polynomial number_of_terms method (and deprecate 
hamming_weight)
-------------------------------------+-------------------------------------
       Reporter:  bruno              |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.8
      Component:  commutative        |   Resolution:
  algebra                            |    Merged in:
       Keywords:  polynomial         |    Reviewers:
        Authors:  Bruno Grenet       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  aec2c54b8772c569457114db115a6faad66c84c8
  u/bruno/hamming_weight_number_of_terms|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by bruno):

 Replying to [comment:16 klee]:
 > When we say the number of terms, we think of the vector of the
 coefficients. For the vector, the Hamming weight is a well-established
 concept in coding theory, and spreading to other areas. So I think the
 method name `hamming_weight` is well chosen. For a user, `number_of_terms`
 may be more intuitive, but it would not hurt and indeed be beneficial to
 learn a mathematical term (no pun intended).

 As you tell, Hamming weight is well established in ''some'' mathematical
 areas, but not all of them. For people working outside these areas, they
 would not think to look for a method `hamming_weight` and simply think
 that it is not implemented. (As I wrote somewhere above, I was in this
 case and not the only one!) With the same arguments, I could say it should
 be named `sparsity` since in some areas, this is the name people use.
 (Arguments have been given above for not using `sparsity` and I agree.)

 I do not think it is a matter of learning an unknown mathematical term.
 Coming from theoretical computer science, I know what Hamming weight means
 but it is (in my mind) related to vector of bits (or boolean words). A
 very quick search showed that it is mainly used with the finite field
 `GF(2)`, sometimes with other finite fields `GF(q)`, and very rarely with
 non-finite fields. So I am not sure the name is generically appropriate
 for polynomials. (Note also that you mention that Hamming weight ''of
 vectors'' is very standard. Here we are speaking of polynomials!)

 Maybe the right solution would be to have aliases, so that coding
 theorists find the method under the name `hamming_weight` and others find
 it under the name `number_of_terms`.


 >
 > Aside, in the history of Sage, coding theory played some role. The
 method name seems to be one aspect of the heritage.

 You may well be right. But is that a (sufficient) reason to keep this
 name? I honestly have no opinion about this question.

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