LightGraphsFlows.jl icon indicating copy to clipboard operation
LightGraphsFlows.jl copied to clipboard

Fix #40

Open gdalle opened this issue 3 years ago • 7 comments

Hello there

As per @etienneINSA's request in #40 here is a specialization of the max-flow function for weighted graphs in which the capacities are equal to the weights. I'm not entirely confident it works well, since @simonschoelly's suggestion to simply use weights(g) instead of relying on SimpleWeightedGraphs.jl removed all the bugs without letting me understand them, but the small tests I added seem to suggest it's fine.

What do you think about the function signature? I would have used multiple dispatch instead of an additional argument but I didn't know how to detect weighted graphs without SWG.

gdalle avatar Mar 01 '21 16:03 gdalle