Note

This documents the development version of NetworkX. Documentation for the current release can be found here.

networkx.algorithms.tree.recognition.is_branching

is_branching(G)[source]

Returns True if G is a branching.

A branching is a directed forest with maximum in-degree equal to 1.

Parameters
Gdirected graph

The directed graph to test.

Returns
bbool

A boolean that is True if G is a branching.

See also

is_forest

Notes

In another convention, a branching is also known as a forest.