Skip to content

Commit

Permalink
src/sage/topology: Remove chomp interface deprecated in sagemath#33777
Browse files Browse the repository at this point in the history
…(2022)
  • Loading branch information
mkoeppe committed Apr 25, 2024
1 parent 15fcf52 commit a1011d3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 60 deletions.
24 changes: 0 additions & 24 deletions src/sage/topology/cubical_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -1690,30 +1690,6 @@ def algebraic_topological_model(self, base_ring=None):
base_ring = QQ
return algebraic_topological_model(self, base_ring)

def _chomp_repr_(self):
r"""
String representation of self suitable for use by the CHomP
program. This lists each maximal cube on its own line.
This function is deprecated.
EXAMPLES::
sage: C = cubical_complexes.Cube(0).product(cubical_complexes.Cube(2))
sage: C.maximal_cells()
{[0,0] x [0,1] x [0,1]}
sage: C._chomp_repr_()
doctest:...: DeprecationWarning: the CHomP interface is deprecated; hence so is this function
See https://github.com/sagemath/sage/issues/33777 for details.
'[0,0] x [0,1] x [0,1]\n'
"""
deprecation(33777, "the CHomP interface is deprecated; hence so is this function")
s = ""
for c in self.maximal_cells():
s += str(c)
s += "\n"
return s

def _simplicial_(self):
r"""
Simplicial complex constructed from self.
Expand Down
36 changes: 0 additions & 36 deletions src/sage/topology/simplicial_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -4498,42 +4498,6 @@ def _translation_from_numeric(self):
d = self._vertex_to_index
return {idx: v for v, idx in d.items()}

def _chomp_repr_(self):
r"""
String representation of ``self`` suitable for use by the CHomP
program. This lists each facet on its own line, and makes
sure vertices are listed as numbers.
This function is deprecated.
EXAMPLES::
sage: S = SimplicialComplex([(0,1,2), (2,3,5)])
sage: print(S._chomp_repr_())
doctest:...: DeprecationWarning: the CHomP interface is deprecated; hence so is this function
See https://github.com/sagemath/sage/issues/33777 for details.
(2, 3, 5)
(0, 1, 2)
A simplicial complex whose vertices are tuples, not integers::
sage: S = SimplicialComplex([[(0,1), (1,2), (3,4)]])
sage: S._chomp_repr_()
'(0, 1, 2)\n'
"""
deprecation(33777, "the CHomP interface is deprecated; hence so is this function")
s = ""
numeric = self._is_numeric()
if not numeric:
d = self._translation_to_numeric()
for f in self.facets():
if numeric:
s += str(f)
else:
s += '(' + ', '.join(str(d[a]) for a in f) + ')'
s += '\n'
return s

# this function overrides the standard one for GenericCellComplex,
# because it lists the maximal faces, not the total number of faces.
def _repr_(self):
Expand Down

0 comments on commit a1011d3

Please sign in to comment.