#18714: Dual bases for finite fields
-------------------------------------+-------------------------------------
       Reporter:  tgagne             |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  minor              |    Milestone:  sage-6.8
      Component:  finite rings       |   Resolution:
       Keywords:  dual basis,        |    Merged in:
  finite field                       |    Reviewers:  Vincent Delecroix
        Authors:  Thomas Gagne       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  3a14bb2edd87281873d4f2b49d1c5d210c4a4a3c
  u/tgagne/dual_basis_finite_field   |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by vdelecroix):

 * status:  needs_review => needs_work
 * reviewer:   => Vincent Delecroix


Comment:

 Hello,

 The code and the documentation are very clean! That is a pleasure to read.
 Here are some comments.

 1. Could you move the content of the `OUTPUT` block (i.e. the definition
 of duality) just after the one-line description. The `OUTPUT` section is
 not mandatory. And in your case what is the output is quite clear from the
 description.

 2. You can replace {{{if check == True}}} by {{{if check}}}.

 3. Be careful that there are a lot of trailing whitespaces (ie a space
 just before the end of a line). Please get rid of them. In most editors,
 they can be deleted (or highlighted) automatically.

 4. You can do the following
 {{{
 entries = []
 for i in range(self.degree()):
     row = []
     for j in range(self.degree()):
         row.append((basis[i] * basis[j]).trace())
     entries.append(row)
 }}}
   in one Python instruction
 {{{
 entries = [[(basis[i] * basis[j]).trace() for j in range(self.degree()] \
             for i in range(self.degree())]
 }}}
   or even better, you can initialize your matrix with
 {{{
     m = matrix(base_ring, dimension, lambda i,j:
 (basis[i]*basis[j]).trace())
 }}}

 Vincent

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