Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
expose is_bounded of CombinatorialPolyhedron
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Jan 27, 2020
1 parent dde78cb commit 19ccbe3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,27 @@ cdef class CombinatorialPolyhedron(SageObject):
"""
return self._n_Hrepresentation

def is_compact(self):
r"""
Return whether the polyheddron is compact
EXAMPLES::
sage: C = CombinatorialPolyhedron([[0,1], [0,2]], far_face=[1,2], unbounded=True)
sage: C.is_compact()
False
sage: C = CombinatorialPolyhedron([[0,1], [0,2], [1,2]])
sage: C.is_compact()
True
sage: P = polytopes.simplex()
sage: P.combinatorial_polyhedron().is_compact()
True
sage: P = Polyhedron(rays=P.vertices())
sage: P.combinatorial_polyhedron().is_compact()
False
"""
return self.is_bounded()

cdef bint is_bounded(self):
r"""
Return whether the polyhedron is bounded.
Expand Down

0 comments on commit 19ccbe3

Please sign in to comment.