#17339: Polyhedron class mistreats empty inputs
-------------------------------------+-------------------------------------
Reporter: darij | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.4
Component: geometry | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | public/polytopes/0
f7642d6e2d2502e3df95c76ef2ffa7e9319a99aa| Dependencies:
Stopgaps: |
-------------------------------------+-------------------------------------
{{{
sage: Polyhedron(ambient_dim=0, ieqs=[], eqns=[], base_ring=QQ)
The empty polyhedron in QQ^0
}}}
This should be a one-point polyhedron.
{{{
sage: Polyhedron(ambient_dim=2, ieqs=[], eqns=[], base_ring=QQ)
The empty polyhedron in QQ^2
}}}
This should be the whole QQ^2.
{{{
sage: Polyhedron(ambient_dim=2, vertices=[], rays=[(2,2)], lines=[],
base_ring=QQ)
A 1-dimensional polyhedron in QQ^2 defined as the convex hull of 1 vertex
and 1 ray
}}}
This should be the empty polyhedron, since there are no vertices for the
ray to emanate from.
{{{
sage: Polyhedron(ambient_dim=2, vertices=[], rays=[], lines=[],
base_ring=QQ)
The empty polyhedron in QQ^2
}}}
This is correct, but only because the code misunderstands the empty
V-representation as no V-representation given at all.
The attached branch fixes the H-representation part, but already that
comes at the cost of failing doctests. The real deal is fixing the
V-representation (which then should fix the doctests as well).
--
Ticket URL: <http://trac.sagemath.org/ticket/17339>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.