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

Commit

Permalink
Change to ClosureOfManifoldSubset
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Apr 29, 2021
1 parent 3b3662e commit 0666fae
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 deletions.
29 changes: 0 additions & 29 deletions src/sage/manifolds/closure_topological_submanifold.py

This file was deleted.

40 changes: 40 additions & 0 deletions src/sage/manifolds/subsets/closure.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
r"""
Topological closures of subsets
"""

from sage.manifolds.subset import ManifoldSubset

class ClosureOfManifoldSubset(ManifoldSubset):

"""
Topological closure of a manifold subset in the topology of the manifold.
"""

def __init__(self, subset, name=None, latex_name=None):
r"""
Initialize a :class:`ClosureOfManifoldSubset` instance.
TESTS::
"""
self._subset = subset
base_manifold = subset.manifold()
if latex_name is None:
if name is None:
latex_name = r'\mathop{\mathrm{cl}}(' + subset._latex_name + ')'
else:
latex_name = name
if name is None:
name = 'cl_' + subset._name
ManifoldSubset.__init__(self, base_manifold, name, latex_name=latex_name)
self.declare_superset(subset)

def _repr_(self):
r"""
String representation of the object.
TESTS::
"""
return "Topological closure {} of the {}".format(self._name, self._submanifold)
11 changes: 0 additions & 11 deletions src/sage/manifolds/topological_submanifold.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,14 +774,3 @@ def as_subset(self):
"""
return self.embedding().image()

def closure(self):
r"""
Return the topological closure of ``self`` as a subset of the ambient manifold.
1-dimensional topological submanifold N embedded in the 2-dimensional topological manifold M
sage: N.closure()
Topological closure cl_N of the 1-dimensional topological submanifold N embedded in the 2-dimensional topological manifold M
"""
from .closure_topological_submanifold import ClosureOfTopologicalSubmanifold
return ClosureOfTopologicalSubmanifold(self)

0 comments on commit 0666fae

Please sign in to comment.