#8986: Add support for convex rational polyhedral cones
----------------------------------+-----------------------------------------
   Reporter:  novoselt            |       Owner:  mhampton  
       Type:  enhancement         |      Status:  needs_work
   Priority:  major               |   Milestone:  sage-4.4.4
  Component:  geometry            |    Keywords:            
     Author:  Andrey Novoseltsev  |    Upstream:  N/A       
   Reviewer:  Volker Braun        |      Merged:            
Work_issues:                      |  
----------------------------------+-----------------------------------------

Comment(by novoselt):

 I have realized that `(1,0,0)` in the examples above is not a vector, but
 just a tuple. Then I have done the following test:
 {{{
 sage: (1,0,0) == vector([1,0,0])
 False
 sage: vector([1,0,0]) == (1,0,0)
 False
 sage: vector([1,0,0]) + (1,0,0)
 TypeError: unsupported operand parent(s) for '+': 'Ambient free module of
 rank 3 over the principal ideal domain Integer Ring' and '<type 'tuple'>'
 sage: (1,0,0) + (1,0,0)
 (1, 0, 0, 1, 0, 0)
 }}}
 It is not really an issue of the coercion, it is just not possible to
 always use tuples as a replacement for lattice points. We made it,
 however, very easy to work with them:
 {{{
 sage: N(1,0,0) + N(1,0,0)
 N(2, 0, 0)
 }}}
 So I think that equality tests will remain as they are now. Operations
 involving "pure" vectors may need more work, perhaps:
 {{{
 sage: N(1,0,0) + vector((1,0,0))
 N(2, 0, 0)
 sage: vector((1,0,0)) + N(1,0,0)
 (2, 0, 0)
 }}}
 although this does not bother me too much and I would suggest leaving this
 as is until we see where and how it can cause problems. (Making the second
 line return `N(2,0,0)` can be a bit tricky.)

 Will post a new patch once I figure out how to work with warnings (never
 used them before).

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