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

Commit

Permalink
src/sage/geometry/relative_interior.py: Fix doctest output
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Jun 15, 2021
1 parent e6c3ed5 commit 4c7d57f
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/sage/geometry/relative_interior.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,36 @@ def __contains__(self, point):
"""
return self._polyhedron.relative_interior_contains(point)

def ambient(self):
r"""
Return the ambient convex set or space.
EXAMPLES::
sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of
a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.ambient()
Vector space of dimension 2 over Rational Field
"""
return self._polyhedron.ambient()

def ambient_vector_space(self, base_field=None):
r"""
Return the ambient vector space.
EXAMPLES::
sage: segment = Polyhedron([[1, 2], [3, 4]])
sage: ri_segment = segment.relative_interior(); ri_segment
Relative interior of
a 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 2 vertices
sage: ri_segment.ambient_vector_space()
Vector space of dimension 2 over Rational Field
"""
return self._polyhedron.ambient_vector_space(base_field=base_field)

def ambient_dim(self):
r"""
Return the dimension of the ambient space.
Expand Down

0 comments on commit 4c7d57f

Please sign in to comment.