From 94e68582fde0f5bb8b2c57e5f7aa56dbaa5e825a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 12 Jun 2021 09:21:21 -0700 Subject: [PATCH] RelativeInterior.ambient, ambient_vector_space, is_universe: New --- src/sage/geometry/relative_interior.py | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/sage/geometry/relative_interior.py b/src/sage/geometry/relative_interior.py index 3fd2f6c6b54..c714faabcb9 100644 --- a/src/sage/geometry/relative_interior.py +++ b/src/sage/geometry/relative_interior.py @@ -69,6 +69,34 @@ 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() + """ + 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() + """ + return self._polyhedron.ambient_vector_space(base_field=base_field) + def ambient_dim(self): r""" Return the dimension of the ambient space.