Commit fb8200fe authored by Ale Abdo's avatar Ale Abdo

Fixes bugs introduced in code restructuring.

3) missing parallel edge check in uncorrelated strategy
2) "_in()" for target and source of "target swap edge"
1) order of arguments of swap_edge_triad::parallel_check

melodrama time...
"premature optimization is the root of all evil"
"careless abstraction are the fruits of its tree"
parent a1be5db4
......@@ -114,8 +114,8 @@ struct swap_edge_triad
template <class Graph, class NewEdgeMap>
static bool parallel_check(typename graph_traits<Graph>::edge_descriptor e,
typename graph_traits<Graph>::edge_descriptor te,
typename graph_traits<Graph>::edge_descriptor se,
typename graph_traits<Graph>::edge_descriptor te,
NewEdgeMap edge_is_new, const Graph &g)
// We want to check that if we swap the source of 'e' with the source of
......@@ -134,7 +134,7 @@ struct swap_edge_triad
s = source(e, g), // current source
t = target(e, g), // current target
ns = source(se, g), // new source
nt = target(te, g), // new target
nt = target_in()(te, g), // new target
te_s = source_in()(te, g), // target edge source
se_t = target(se, g); // source edge target
......@@ -412,6 +412,9 @@ public:
if (!parallel_edges) // reject parallel edges if not allowed
if(_edge_is_new[*esi] && (source(e, _g)==source(*esi, _g)) &&
(target(*esi, _g)==target_in()(*eti, _g)))
if (swap_edge_triad::parallel_check(e, *esi, *eti,
_edge_is_new, _g))
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