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

Commit

Permalink
#26326 : reorder creation of random graphs to avoid creating an empty…
Browse files Browse the repository at this point in the history
… one by bad luck on 32-bit systems.
  • Loading branch information
Thierry Monteil committed Jan 6, 2019
1 parent c584662 commit 38ac59f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 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 @@ -18674,6 +18674,10 @@ def layout_tree(self, tree_orientation="down", tree_root=None,

EXAMPLES::

sage: G = graphs.RandomTree(80)
sage: G.plot(layout="tree", tree_orientation="right")
Graphics object consisting of 160 graphics primitives

sage: T = graphs.RandomLobster(25, 0.3, 0.3)
sage: T.show(layout='tree', tree_orientation='up')

Expand All @@ -18696,10 +18700,6 @@ def layout_tree(self, tree_orientation="down", tree_root=None,
sage: G.plot(layout="tree", tree_root=0, tree_orientation="up")
Graphics object consisting of 62 graphics primitives

sage: G = graphs.RandomTree(80)
sage: G.plot(layout="tree", tree_orientation="right")
Graphics object consisting of 160 graphics primitives

Using the embedding when it exists::

sage: T = Graph([(0, 1), (0, 6), (0, 3), (1, 2), (1, 5), (3, 4), (3, 7), (3, 8)])
Expand Down
3 changes: 0 additions & 3 deletions src/sage/graphs/graph_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1294,9 +1294,6 @@ def layout_tree(self, root, orientation):
EXAMPLES::
sage: T = graphs.RandomLobster(25,0.3,0.3)
sage: T.show(layout='tree',tree_orientation='up') # indirect doctest
sage: from sage.graphs.graph_plot import GraphPlot
sage: G = graphs.HoffmanSingletonGraph()
sage: T = Graph()
Expand Down

0 comments on commit 38ac59f

Please sign in to comment.