Skip to main content

arborescence_iterator

Function arborescence_iterator 

Source
pub fn arborescence_iterator(
    digraph: &DiGraph,
    weight_attr: &str,
    max_count: usize,
) -> Vec<DiGraph>
Expand description

Enumerate spanning arborescences of a directed graph in weight-sorted order.

Uses the Janssens-Sörensen partition scheme adapted for directed graphs. For each partition, finds the minimum/maximum arborescence respecting constraints using Edmonds’ algorithm. Matches NX ArborescenceIterator.

When an edge is included in the partition, all other incoming edges to the same target are automatically excluded (arborescence in-degree-1 invariant).