@@ -802,7 +802,7 @@ def __hash__(self):
802
802
"""
803
803
return hash (self .__set )
804
804
805
- def _repr_ (self ):
805
+ def _repr_ (self ) -> str :
806
806
"""
807
807
Print representation.
808
808
@@ -2003,38 +2003,23 @@ def suspension(self, n=1, is_mutable=True):
2003
2003
rename_vertices = True )
2004
2004
return self .suspension (1 , is_mutable ).suspension (int (n - 1 ), is_mutable )
2005
2005
2006
- def disjoint_union (self , right , rename_vertices = None , is_mutable = True ):
2006
+ def disjoint_union (self , right , is_mutable = True ):
2007
2007
"""
2008
2008
The disjoint union of this simplicial complex with another one.
2009
2009
2010
2010
INPUT:
2011
2011
2012
2012
- ``right`` -- the other simplicial complex (the right-hand factor)
2013
2013
2014
- - ``rename_vertices`` -- boolean (default: ``True``); if this is
2015
- ``True``, the vertices in the disjoint union will be renamed by the
2016
- formula: vertex "v" in the left-hand factor --> vertex "Lv" in the
2017
- disjoint union, vertex "w" in the right-hand factor --> vertex "Rw"
2018
- in the disjoint union. If this is false, this tries to construct the
2019
- disjoint union without renaming the vertices; this will cause
2020
- problems if the two factors have any vertices with names in common.
2021
-
2022
2014
EXAMPLES::
2023
2015
2024
2016
sage: S1 = simplicial_complexes.Sphere(1)
2025
2017
sage: S2 = simplicial_complexes.Sphere(2)
2026
2018
sage: S1.disjoint_union(S2).homology() # needs sage.modules
2027
2019
{0: Z, 1: Z, 2: Z}
2028
2020
"""
2029
- if rename_vertices is not None :
2030
- from sage .misc .superseded import deprecation
2031
- deprecation (35907 , 'the "rename_vertices" argument is deprecated' )
2032
-
2033
- facets = []
2034
- for f in self ._facets :
2035
- facets .append (tuple (["L" + str (v ) for v in f ]))
2036
- for f in right ._facets :
2037
- facets .append (tuple (["R" + str (v ) for v in f ]))
2021
+ facets = [tuple (f"L{ v } " for v in f ) for f in self ._facets ]
2022
+ facets .extend (tuple (f"R{ v } " for v in f ) for f in right ._facets )
2038
2023
return SimplicialComplex (facets , is_mutable = is_mutable )
2039
2024
2040
2025
def wedge (self , right , rename_vertices = True , is_mutable = True ):
@@ -4516,7 +4501,7 @@ def _translation_from_numeric(self):
4516
4501
4517
4502
# this function overrides the standard one for GenericCellComplex,
4518
4503
# because it lists the maximal faces, not the total number of faces.
4519
- def _repr_ (self ):
4504
+ def _repr_ (self ) -> str :
4520
4505
"""
4521
4506
Print representation.
4522
4507
0 commit comments