Skip to content

Commit

Permalink
39297: fix small issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoudert committed Jan 7, 2025
1 parent c3a9f91 commit 57ff81d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sage/graphs/generic_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -8742,11 +8742,11 @@ def longest_path(self, s=None, t=None, use_edge_labels=False,
sage: lp2 = g2.longest_path(use_edge_labels=True)
sage: lp1[0] == lp2[0]
True
sage: not lp1.is_immutable() and lp2.is_immutable()
sage: not lp1[1].is_immutable() and lp2[1].is_immutable()
True
sage: lp1 = g1.longest_path(use_edge_labels=True, immutable=True)
sage: lp2 = g2.longest_path(use_edge_labels=True, immutable=False)
sage: lp1.is_immutable() and not lp2.is_immutable()
sage: lp1[1].is_immutable() and not lp2[1].is_immutable()
True
"""
self._scream_if_not_simple()
Expand Down Expand Up @@ -9105,7 +9105,7 @@ def hamiltonian_path(self, s=None, t=None, use_edge_labels=False,
sage: g = Graph(g, immutable=True)
sage: g.hamiltonian_path().is_immutable()
True
sage: g.hamiltonian_path(, use_edge_labels=True).is_immutable()
sage: g.hamiltonian_path(use_edge_labels=True)[1].is_immutable()
True
"""
if use_edge_labels or algorithm is None:
Expand Down Expand Up @@ -9235,7 +9235,7 @@ def hamiltonian_path(self, s=None, t=None, use_edge_labels=False,
tsp.delete_vertices(extra_vertices)
tsp.name("Hamiltonian path from {}".format(self.name()))
if immutable:
tst = tsp.copy(immutable=True)
tsp = tsp.copy(immutable=True)

def weight(label):
return 1 if label is None else label
Expand Down

0 comments on commit 57ff81d

Please sign in to comment.