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

Commit

Permalink
Polyhedron_base.affine_hull_manifold: Add argument ambient_chart
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed May 16, 2021
1 parent 8c6759a commit 19a9ceb
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/sage/geometry/polyhedron/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10517,7 +10517,7 @@ def _test_affine_hull_projection(self, tester=None, verbose=False, **options):
tester.assertFalse(data.polyhedron.base_ring() is AA)

def affine_hull_manifold(self, name=None, latex_name=None, start_index=0, ambient_space=None,
names=None, **kwds):
ambient_chart=None, names=None, **kwds):
r"""
Return the affine hull of ``self`` as a manifold.
Expand All @@ -10527,8 +10527,12 @@ def affine_hull_manifold(self, name=None, latex_name=None, start_index=0, ambien
INPUT:
- ``ambient_space`` -- a :class:`~sage.manifolds.differentiable.examples.euclidean.EuclideanSpace`
of the ambient dimension (default: a new instance of ``EuclideanSpace``)
the ambient space.
of the ambient dimension (default: the manifold of ``ambient_chart``, if provided;
otherwise, a new instance of ``EuclideanSpace``).
- ``ambient_chart`` -- a chart on ``ambient_space``.
- ``names`` -- names for the coordinates on the affine hull.
- optional arguments accepted by :meth:`~sage.geometry.polyhedron.base.affine_hull_projection`.
Expand Down Expand Up @@ -10587,13 +10591,20 @@ def affine_hull_manifold(self, name=None, latex_name=None, start_index=0, ambien
"""
if ambient_space is None:
from sage.manifolds.differentiable.examples.euclidean import EuclideanSpace
ambient_space = EuclideanSpace(self.ambient_dim(), start_index=start_index)
if ambient_chart is not None:
ambient_space = ambient_chart.manifold()
else:
from sage.manifolds.differentiable.examples.euclidean import EuclideanSpace
ambient_space = EuclideanSpace(self.ambient_dim(), start_index=start_index)
if ambient_space.dimension() != self.ambient_dim():
raise ValueError('ambient_space and ambient_chart must match the ambient dimension')

if self.is_full_dimensional():
return ambient_space

CE = ambient_space.default_chart()
if ambient_chart is None:
ambient_chart = ambient_space.default_chart()
CE = ambient_chart

from sage.manifolds.manifold import Manifold
if name is None:
Expand Down

0 comments on commit 19a9ceb

Please sign in to comment.