Edmonds.find_optimum#

Edmonds.find_optimum(attr='weight', default=1, kind='max', style='branching', preserve_attrs=False, partition=None, seed=None)[source]#

Returns a branching from G.

Parameters:
attrstr

The edge attribute used to in determining optimality.

defaultfloat

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

kind{‘min’, ‘max’}

The type of optimum to search for, either ‘min’ or ‘max’.

style{‘branching’, ‘arborescence’}

If ‘branching’, then an optimal branching is found. If style is ‘arborescence’, then a branching is found, such that if the branching is also an arborescence, then the branching is an optimal spanning arborescences. A given graph G need not have an optimal spanning arborescence.

preserve_attrsbool

If True, preserve the other edge attributes of the original graph (that are not the one passed to attr)

partitionstr

The edge attribute holding edge partition data. Used in the spanning arborescence iterator.

seedinteger, random_state, or None (default)

Indicator of random number generation state. See Randomness.

Returns:
H(multi)digraph

The branching.