#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):

 Replying to [comment:5 vbraun]:
 > I find `ConvexRationalPolyhedralCone.strict_subcone()` confusing: It
 does return a quotient cone, not a subcone. Maybe we can call it
 `strict_quotient()`?

 Agreed. I just had to construct this object for equivalence checks and
 didn't really know how to call it.

 > 1) get rid of `IntegralRayCollection.__contains__(ray)`. If you need to
 test membership, its easy enough to search `self.rays()` or
 `self.rays_set()`:
 Agreed.

 > 2) tighten the rules for comparison of N/M-lattice objects:
 {{{
 sage: M(1,0,0) == N(1,0,0)   # this should raise an error
 False
 }}}

 Disagreed. Maybe it is silly to ask if an apple is equal to a car, but
 there is nothing criminal in it. I think that in general in Python you can
 compare any two objects and sort lists containing arbitrary objects. So I
 think that `False` is the correct answer in this case.

 >
 {{{
 sage: (1,0,0) == N(1,0,0)    # should probably return true
 False
 sage: M(1,0,0) == (1,0,0)    # should probably return true as well
 False
 }}}

 I kind of don't like that we have here a==b and c==a, but b!=c... Do you
 really want to have it in? It may be actually non-trivial to implement. I
 already had to tweak the coercion system so that sometimes it allows "non-
 toric-lattice" objects to be involved and sometimes it does not. In
 particular I had to make sure that elements of toric lattices are NOT
 coerced into ZZ^n.

 So if you insist, I will try to make it work, but I cannot guarantee that
 I will be successful and personally I think that we should not change it,
 as long as this behaviour is clearly documented. (Probably it is not, but
 that's something which definitely can be fixed ;-))

 >
 {{{
 sage: M(1,0,0) in octant.rays()  # this should definitely raise an error
 False
 }}}

 Again, I don't think that there should be any errors raised by comparison
 operations. `False` is an accurate answer to this question - and octant in
 the N-lattice does not contain any points of the M-lattice.

 > 3) add methods `contains(n)` to `ConvexRationalPolyhedralCone` to test
 whether a N-lattice point is contained in the cone, e.g. (untested)

 Agreed. It was on my list of things to do in the future, might as well do
 it now.

 > 4) `ConvexRationalPolyhedralCone.__contains__()` just calls
 `contains()`. This is syntactic sugar, but `__` methods alone don't show
 up in the documentation.

 Very good point!!! I knew that they don't show up, but didn't think about
 just making a "common method" alias.

 Please comment on the points of disagreement and I will try to fix the
 issues in a couple of days. Thanks for a careful review!

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