[Lemon-commits] [lemon_svn] jacint: r1490 - hugo/trunk/src/test
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:45:50 CET 2006
Author: jacint
Date: Tue Jan 25 18:39:24 2005
New Revision: 1490
Modified:
hugo/trunk/src/test/max_matching_test.cc
Log:
following the changes of max_matching.h
Modified: hugo/trunk/src/test/max_matching_test.cc
==============================================================================
--- hugo/trunk/src/test/max_matching_test.cc (original)
+++ hugo/trunk/src/test/max_matching_test.cc Tue Jan 25 18:39:24 2005
@@ -22,8 +22,9 @@
#include "test_tools.h"
#include <lemon/invalid.h>
#include <lemon/list_graph.h>
-#include <graph_gen.h>
-#include <max_matching.h>
+#include <lemon/max_matching.h>
+//temporarily
+#include <work/jacint/graph_gen.h>
using namespace std;
using namespace lemon;
@@ -53,13 +54,16 @@
if ( mate[v]!=INVALID ) ++s;
}
int size=(int)s/2; //size will be used as the size of a maxmatching
-
+
+ for(NodeIt v(G); v!=INVALID; ++v) {
+ max_matching.mate(v);
+ }
+
check ( size == max_matching.size(), "mate() returns a different size matching than max_matching.size()" );
Graph::NodeMap<MaxMatching<Graph>::pos_enum> pos0(G);
max_matching.writePos(pos0);
- max_matching.resetPos();
max_matching.resetMatching();
max_matching.runEdmonds(1);
s=0;
@@ -72,7 +76,6 @@
Graph::NodeMap<MaxMatching<Graph>::pos_enum> pos1(G);
max_matching.writePos(pos1);
- max_matching.resetPos();
max_matching.run();
s=0;
max_matching.writeNMapNode(mate);
@@ -84,7 +87,6 @@
Graph::NodeMap<MaxMatching<Graph>::pos_enum> pos2(G);
max_matching.writePos(pos2);
- max_matching.resetPos();
max_matching.resetMatching();
max_matching.run();
s=0;
More information about the Lemon-commits
mailing list