networkx.algorithms.maximum_branching

networkx.algorithms.maximum_branching(G, attr='weight', default=1)[source]

Returns a maximum branching from G.

Parameters:

G : (multi)digraph-like

The graph to be searched.

attr : str

The edge attribute used to in determining optimality.

default : float

The value of the edge attribute used if an edge does not have the attribute attr.

Returns:

B : (multi)digraph-like

A maximum branching.