Commit f4520a95 authored by Tiago Peixoto's avatar Tiago Peixoto

boykov_kolmogorov_max_flow(): Fix problem with parallel reciprocal edges

This fixes issue #598
parent f3ec0a54
Pipeline #502 canceled with stage
in 408 minutes and 57 seconds
......@@ -40,9 +40,11 @@ void augment_graph(Graph& g, AugmentedMap augmented, CapacityMap capacity,
}
else
{
if (augmented[e] != false)
continue;
for (auto ae : out_edges_range(target(e, g), g))
{
if (target(ae, g) == source(e, g) && augmented[e] == false)
if (target(ae, g) == source(e, g) && augmented[ae] == false)
{
augmented[e] = augmented[ae] = 2;
rmap[e] = ae;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment