#5117: Rename the Polyhedron.union(...) method
---------------------------+------------------------------------------------
Reporter: sbarthelemy | Owner: mhampton
Type: defect | Status: needs_info
Priority: major | Milestone: sage-4.4
Component: geometry | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Changes (by novoselt):
* status: new => needs_info
* upstream: => N/A
Comment:
Current version is doing this:
{{{
new_vertices = self.vertices() + other.vertices()
new_rays = self.rays() + other.rays()
new_lines = self.lines() + other.lines()
return Polyhedron(vertices=new_vertices,
rays=new_rays, lines=new_lines, field=self.field())
}}}
which is great, but I STRONGLY support the idea of renaming the method to
something else.
I was once working with an algorithm where the *union* of polytopes was
used, but I interpreted it exactly as the convex hull and of course got
wrong results. I was not using this function, that was my own mistake, but
since it is so easy to do, I don't think there should be an extra
opportunity for confusion. I agree, that the result is described in the
documentation, but I don't always read it for "obvious" functions and
perhaps there are other users like me.
How about "extend"? "convex_hull" is also great, although it seems more
natural to me to have a global function with such a name called like
{{{
convex_hull(polyhedron1, polyhedron2, polyhedron3, ...)
}}}
(There is a function with this name in lattice_polytope which works with
points and thinking about it now I suspect that I have chosen not the best
name for it either... At least it is not imported into global
namespace...)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5117#comment:5>
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.