#9337: Add toric divisors
----------------------------------+-----------------------------------------
   Reporter:  vbraun              |       Owner:  AlexGhitza  
       Type:  enhancement         |      Status:  needs_review
   Priority:  major               |   Milestone:  sage-4.6    
  Component:  algebraic geometry  |    Keywords:              
     Author:  Volker Braun        |    Upstream:  N/A         
   Reviewer:  Andrey Novoseltsev  |      Merged:              
Work_issues:                      |  
----------------------------------+-----------------------------------------
Changes (by vbraun):

  * status:  needs_work => needs_review
  * work_issues:  doctest failures =>


Comment:

 I fixed the doctests, that was just a minor issue. Thanks for catching it!

 The divisor code already assumes at places that the divisor is reduced (we
 should probably call this "collected", but I'll stick with it for now),
 for example in the original code to extract the coefficient. In general I
 think allowing unreduced divisors is going to be a huge pitfall for future
 contributors as well as a performance impediment. If one really wanted
 non-reduced divisors then one needs a flag to remember whether one already
 did the reduction to avoid doing it over and over. On a final word of
 warning:
 {{{
 sage: FormalSum([[1,2],[1,2]],reduce=False) == FormalSum([[2,2]])
 False
 }}}

 The `reduce()` method is inherited from `FormalSum`, there is nothing more
 to it. We could add a base class `ReducedFormalSum` without this method if
 it bugs you, but I think thats not worth the effort.

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