diff --git a/test/max_matching_test.cc b/test/max_matching_test.cc --- a/test/max_matching_test.cc +++ b/test/max_matching_test.cc @@ -138,13 +138,17 @@ const_mat_test.matchingSize(); const_mat_test.matching(e); const_mat_test.matching(n); + const MaxMatching::MatchingMap& mmap = + const_mat_test.matchingMap(); + e = mmap[n]; const_mat_test.mate(n); MaxMatching::Status stat = - const_mat_test.decomposition(n); + const_mat_test.status(n); + const MaxMatching::StatusMap& smap = + const_mat_test.statusMap(); + stat = smap[n]; const_mat_test.barrier(n); - - ignore_unused_variable_warning(stat); } void checkMaxWeightedMatchingCompile() @@ -167,10 +171,13 @@ mat_test.start(); mat_test.run(); - const_mat_test.matchingValue(); + const_mat_test.matchingWeight(); const_mat_test.matchingSize(); const_mat_test.matching(e); const_mat_test.matching(n); + const MaxWeightedMatching::MatchingMap& mmap = + const_mat_test.matchingMap(); + e = mmap[n]; const_mat_test.mate(n); int k = 0; @@ -201,9 +208,12 @@ mat_test.start(); mat_test.run(); - const_mat_test.matchingValue(); + const_mat_test.matchingWeight(); const_mat_test.matching(e); const_mat_test.matching(n); + const MaxWeightedPerfectMatching::MatchingMap& mmap = + const_mat_test.matchingMap(); + e = mmap[n]; const_mat_test.mate(n); int k = 0; @@ -224,9 +234,9 @@ int barrier_num = 0; for (NodeIt n(graph); n != INVALID; ++n) { - check(mm.decomposition(n) == MaxMatching::EVEN || + check(mm.status(n) == MaxMatching::EVEN || mm.matching(n) != INVALID, "Wrong Gallai-Edmonds decomposition"); - if (mm.decomposition(n) == MaxMatching::ODD) { + if (mm.status(n) == MaxMatching::ODD) { ++barrier_num; } else { comp.insert(n); @@ -239,16 +249,16 @@ check(e == mm.matching(graph.v(e)), "Wrong matching"); ++num; } - check(mm.decomposition(graph.u(e)) != MaxMatching::EVEN || - mm.decomposition(graph.v(e)) != MaxMatching::MATCHED, + check(mm.status(graph.u(e)) != MaxMatching::EVEN || + mm.status(graph.v(e)) != MaxMatching::MATCHED, "Wrong Gallai-Edmonds decomposition"); - check(mm.decomposition(graph.v(e)) != MaxMatching::EVEN || - mm.decomposition(graph.u(e)) != MaxMatching::MATCHED, + check(mm.status(graph.v(e)) != MaxMatching::EVEN || + mm.status(graph.u(e)) != MaxMatching::MATCHED, "Wrong Gallai-Edmonds decomposition"); - if (mm.decomposition(graph.u(e)) != MaxMatching::ODD && - mm.decomposition(graph.v(e)) != MaxMatching::ODD) { + if (mm.status(graph.u(e)) != MaxMatching::ODD && + mm.status(graph.v(e)) != MaxMatching::ODD) { comp.join(graph.u(e), graph.v(e)); } } @@ -256,7 +266,7 @@ std::set comp_root; int odd_comp_num = 0; for (NodeIt n(graph); n != INVALID; ++n) { - if (mm.decomposition(n) != MaxMatching::ODD) { + if (mm.status(n) != MaxMatching::ODD) { int root = comp.find(n); if (comp_root.find(root) == comp_root.end()) { comp_root.insert(root);