#13417: Improved iteration on finite \ZZ-submodules and vector spaces over 
finite
fields
---------------------------------------------------------+------------------
       Reporter:  tfeulner                               |         Owner:  
AlexGhitza  
           Type:  enhancement                            |        Status:  
needs_review
       Priority:  major                                  |     Milestone:  
sage-5.5    
      Component:  algebra                                |    Resolution:       
       
       Keywords:                                         |   Work issues:       
       
Report Upstream:  N/A                                    |     Reviewers:       
       
        Authors:  Thomas Feulner, Punarbasu Purkayastha  |     Merged in:       
       
   Dependencies:                                         |      Stopgaps:       
       
---------------------------------------------------------+------------------

Comment (by ppurka):

 By "norm" I meant that in usual places like textbooks, the convention
 followed is to have the first nonzero element as 1. Am I right? The reason
 is that once someone new uses this class, the output will not conform to
 what one would expect. I am myself not very familiar with projective
 spaces, so this was the first thing I noticed. Technically, the output is
 correct since the output contains only the representatives.

 Echenolizing the basis is too much computations I think. All that is
 required is to determine the first nonzero element of a vector and
 multiply by its inverse. Something like
 {{{#!python
 ring = v.base_ring()
 for vi in v:
    if vi and vi != ring.one():
       v = vi**(-1) * v
       break
 }}}
 This can be done only once during the iteration.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13417#comment:10>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to