pub fn max_flow(
store: &LpgStore,
source: NodeId,
sink: NodeId,
capacity_property: Option<&str>,
) -> Option<MaxFlowResult>Expand description
Computes maximum flow using the Edmonds-Karp algorithm.
Edmonds-Karp is a specific implementation of Ford-Fulkerson that uses BFS to find augmenting paths, guaranteeing O(VE²) complexity.
§Arguments
store- The graph storesource- Source node IDsink- Sink node IDcapacity_property- Optional property name for edge capacities (defaults to 1.0)
§Returns
Maximum flow value and flow assignment on edges.
§Complexity
O(V × E²)