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

Commit

Permalink
trac #24163: update documentation of blocks_and_cuts_tree
Browse files Browse the repository at this point in the history
  • Loading branch information
dcoudert committed Nov 9, 2017
1 parent 41b0a05 commit 96f4d04
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/sage/graphs/generic_graph.py
Expand Up @@ -5376,7 +5376,8 @@ def blocks_and_cuts_tree(self):
to `u`.

The resulting graph is a tree, with the additional characteristic
property that the distance between two leaves is even.
property that the distance between two leaves is even. When ``self`` is
not connected, the resulting graph is a forest.

When ``self`` is biconnected, the tree is reduced to a single node of
type `B`.
Expand Down Expand Up @@ -5408,6 +5409,14 @@ def blocks_and_cuts_tree(self):
sage: T.vertices()
[('B', (0, 1, 2, 3, 4, 5, 6, 7, 8, 9))]

TESTS:

When ``self`` is not connected, the resulting graph is a forest (:trac:`24163`)::

sage: T = Graph(2).blocks_and_cuts_tree()
sage: T.is_forest()
True

REFERENCES:

.. [HarPri] \F. Harary and G. Prins. The block-cutpoint-tree of
Expand Down

0 comments on commit 96f4d04

Please sign in to comment.