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

Commit

Permalink
Merge branch 't/16909/public/16909' into t/16892/function_to_check_if…
Browse files Browse the repository at this point in the history
…_a_poset_containt_a_subposet_isomorphic_to_another_poset
  • Loading branch information
Jori Mäntysalo committed Sep 16, 2014
2 parents f1d0174 + ad47132 commit 346ef0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sage/graphs/generic_graph.py
Expand Up @@ -14454,9 +14454,13 @@ def transitive_closure(self):
sage: g.transitive_closure().edges(labels=False)
[(0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 3), (2, 4), (2, 5)]

On an immutable digraph::

sage: digraphs.Path(5).copy(immutable=True).transitive_closure()
Transitive closure of Path: Digraph on 5 vertices
"""
from copy import copy
G = copy(self)
G = self.copy(immutable=False)
G.name('Transitive closure of ' + self.name())
for v in G:
# todo optimization opportunity: we are adding edges that
Expand Down

0 comments on commit 346ef0e

Please sign in to comment.