This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sage.manifolds.closure_topological_submanifold, TopologicalSubmanifol…
…d.closure: New
- Loading branch information
Matthias Koeppe
committed
Apr 11, 2021
1 parent
824f9cc
commit 331aa59
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
r""" | ||
Topological closures of embedded submanifolds | ||
""" | ||
|
||
from sage.manifolds.subset import ManifoldSubset | ||
|
||
class ClosureOfTopologicalSubmanifold(ManifoldSubset): | ||
|
||
def __init__(self, submanifold, name=None, latex_name=None): | ||
|
||
self._submanifold = submanifold | ||
base_manifold = submanifold.embedding().codomain() | ||
if name is None: | ||
name = 'cl_' + submanifold._name | ||
if latex_name is None: | ||
if name is None: | ||
latex_name = r'\mathop{\mathrm{cl}}(' + submanifold._latex_name + ')' | ||
else: | ||
latex_name = name | ||
ManifoldSubset.__init__(self, base_manifold, name, latex_name=latex_name) | ||
|
||
def _repr_(self): | ||
r""" | ||
String representation of the object. | ||
TESTS:: | ||
""" | ||
return "Topological closure {} of the {}".format(self._name, self._submanifold) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters