-
Notifications
You must be signed in to change notification settings - Fork 11
Fix #40 #52
base: master
Are you sure you want to change the base?
Fix #40 #52
Conversation
Not entirely satisfied with this because my version of |
Also, for some reason the tests fail because |
If you look at some functions in LightGraphs, like Maybe we can have this here too? Then if one does not want to use any weights with a graph, they can just pass in a |
You need to load SimpleWeightedGraphs in your tests - either with |
Rookie mistake ^^ The bug is fixed but I'm not sure how to include SWG only in the test deps |
And i'm still not satisfied about https://github.com/gdalle/LightGraphsFlows.jl/blob/f755afa2d240292c49a3228e1e0a6fe2bb2904d5/src/maximum_flow.jl#L70, which I think a more seasoned LightGraphs practitioner could easily fix |
Unfortunately, after taking a look, it seems that |
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 onSimpleWeightedGraphs.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.