#13191: Construct a 2-d fan from rays only
--------------------------------+-------------------------------------------
       Reporter:  vbraun        |         Owner:  AlexGhitza        
           Type:  enhancement   |        Status:  needs_work        
       Priority:  major         |     Milestone:  sage-5.2          
      Component:  geometry      |    Resolution:                    
       Keywords:  toric         |   Work issues:  completeness bug  
Report Upstream:  N/A           |     Reviewers:  Andrey Novoseltsev
        Authors:  Volker Braun  |     Merged in:                    
   Dependencies:  #12544        |      Stopgaps:                    
--------------------------------+-------------------------------------------
Changes (by novoselt):

  * work_issues:  => completeness bug


Comment:

 {{{
 sage: Fan2d([(0,1)])
 Rational polyhedral fan in 2-d lattice N
 sage: _.is_complete()
 True
 }}}

 Selecting distinct rays is a bit convoluted, but especially strange is
 repeating this selection on sorted rays which are already distinct just to
 trigger the complete removal of a single ray. How about something like
 this:
 {{{
 ...
 n = len(rays)
 if n == 1 or n == 2 and rays[0] == -rays[1]:
     cones = [(i, ) for i in range(n)]
     return RationalPolyhedralFan(cones, rays, lattice, False)

 import math
 sorted_rays = sorted(...)
 cones = []
 ...
 # there are definitely some 2-d cones now
 }}}

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