equal
deleted
inserted
replaced
81 |
81 |
82 MinLengthPaths(Graph& _G, LengthMap& _length) : G(_G), |
82 MinLengthPaths(Graph& _G, LengthMap& _length) : G(_G), |
83 length(_length), reversed(_G)/*, dijkstra_dist(_G)*/{ } |
83 length(_length), reversed(_G)/*, dijkstra_dist(_G)*/{ } |
84 |
84 |
85 |
85 |
86 ///Runs the algorithm |
86 ///Runs the algorithm. |
|
87 |
|
88 ///Runs the algorithm. |
87 ///Returns k if there are at least k edge-disjoint paths from s to t. |
89 ///Returns k if there are at least k edge-disjoint paths from s to t. |
88 ///Otherwise it returns the number of edge-disjoint paths from s to t. |
90 ///Otherwise it returns the number of found edge-disjoint paths from s to t. |
89 int run(Node s, Node t, int k) { |
91 int run(Node s, Node t, int k) { |
90 ConstMap const1map(1); |
92 ConstMap const1map(1); |
91 |
93 |
92 //We need a residual graph, in which some of the edges are reversed |
94 //We need a residual graph, in which some of the edges are reversed |
93 ResGraphType res_graph(G, reversed, const1map); |
95 ResGraphType res_graph(G, reversed, const1map); |