diff -r 46a82ce84cc6 -r 1bb471764ab8 test/max_matching_test.cc --- a/test/max_matching_test.cc Tue Oct 30 10:51:07 2007 +0000 +++ b/test/max_matching_test.cc Tue Oct 30 20:21:10 2007 +0000 @@ -66,11 +66,12 @@ g.addEdge(nodes[6], nodes[12]); MaxMatching max_matching(g); - max_matching.runEdmonds(0); + max_matching.init(); + max_matching.startDense(); int s=0; Graph::NodeMap mate(g,INVALID); - max_matching.writeNMapNode(mate); + max_matching.mateMap(mate); for(NodeIt v(g); v!=INVALID; ++v) { if ( mate[v]!=INVALID ) ++s; } @@ -82,43 +83,42 @@ check ( size == max_matching.size(), "mate() returns a different size matching than max_matching.size()" ); - Graph::NodeMap::pos_enum> pos0(g); - max_matching.writePos(pos0); + Graph::NodeMap::DecompType> pos0(g); + max_matching.decomposition(pos0); - max_matching.resetMatching(); - max_matching.runEdmonds(1); + max_matching.init(); + max_matching.startSparse(); s=0; - max_matching.writeNMapNode(mate); + max_matching.mateMap(mate); for(NodeIt v(g); v!=INVALID; ++v) { if ( mate[v]!=INVALID ) ++s; } check ( int(s/2) == size, "The size does not equal!" ); - Graph::NodeMap::pos_enum> pos1(g); - max_matching.writePos(pos1); + Graph::NodeMap::DecompType> pos1(g); + max_matching.decomposition(pos1); max_matching.run(); s=0; - max_matching.writeNMapNode(mate); + max_matching.mateMap(mate); for(NodeIt v(g); v!=INVALID; ++v) { if ( mate[v]!=INVALID ) ++s; } check ( int(s/2) == size, "The size does not equal!" ); - Graph::NodeMap::pos_enum> pos2(g); - max_matching.writePos(pos2); + Graph::NodeMap::DecompType> pos2(g); + max_matching.decomposition(pos2); - max_matching.resetMatching(); max_matching.run(); s=0; - max_matching.writeNMapNode(mate); + max_matching.mateMap(mate); for(NodeIt v(g); v!=INVALID; ++v) { if ( mate[v]!=INVALID ) ++s; } check ( int(s/2) == size, "The size does not equal!" ); - Graph::NodeMap::pos_enum> pos(g); - max_matching.writePos(pos); + Graph::NodeMap::DecompType> pos(g); + max_matching.decomposition(pos); bool ismatching=true; for(NodeIt v(g); v!=INVALID; ++v) { @@ -139,8 +139,10 @@ bool noedge=true; for(UEdgeIt e(g); e!=INVALID; ++e) { - if ( (pos[g.target(e)]==max_matching.C && pos[g.source(e)]==max_matching.D) || - (pos[g.target(e)]==max_matching.D && pos[g.source(e)]==max_matching.C) ) + if ( (pos[g.target(e)]==max_matching.C && + pos[g.source(e)]==max_matching.D) || + (pos[g.target(e)]==max_matching.D && + pos[g.source(e)]==max_matching.C) ) noedge=false; } check ( noedge, "There are edges between D and C!" );