Index: test/euler_test.cc
===================================================================
--- test/euler_test.cc	(revision 584)
+++ test/euler_test.cc	(revision 517)
@@ -19,64 +19,61 @@
 #include <lemon/euler.h>
 #include <lemon/list_graph.h>
-#include <lemon/adaptors.h>
-#include "test_tools.h"
+#include <test/test_tools.h>
 
 using namespace lemon;
 
 template <typename Digraph>
-void checkDiEulerIt(const Digraph& g,
-                    const typename Digraph::Node& start = INVALID)
+void checkDiEulerIt(const Digraph& g)
 {
   typename Digraph::template ArcMap<int> visitationNumber(g, 0);
 
-  DiEulerIt<Digraph> e(g, start);
-  if (e == INVALID) return;
+  DiEulerIt<Digraph> e(g);
   typename Digraph::Node firstNode = g.source(e);
   typename Digraph::Node lastNode = g.target(e);
-  if (start != INVALID) {
-    check(firstNode == start, "checkDiEulerIt: Wrong first node");
-  }
 
-  for (; e != INVALID; ++e) {
-    if (e != INVALID) lastNode = g.target(e);
+  for (; e != INVALID; ++e)
+  {
+    if (e != INVALID)
+    {
+      lastNode = g.target(e);
+    }
     ++visitationNumber[e];
   }
 
   check(firstNode == lastNode,
-      "checkDiEulerIt: First and last nodes are not the same");
+      "checkDiEulerIt: first and last node are not the same");
 
   for (typename Digraph::ArcIt a(g); a != INVALID; ++a)
   {
     check(visitationNumber[a] == 1,
-        "checkDiEulerIt: Not visited or multiple times visited arc found");
+        "checkDiEulerIt: not visited or multiple times visited arc found");
   }
 }
 
 template <typename Graph>
-void checkEulerIt(const Graph& g,
-                  const typename Graph::Node& start = INVALID)
+void checkEulerIt(const Graph& g)
 {
   typename Graph::template EdgeMap<int> visitationNumber(g, 0);
 
-  EulerIt<Graph> e(g, start);
-  if (e == INVALID) return;
-  typename Graph::Node firstNode = g.source(typename Graph::Arc(e));
-  typename Graph::Node lastNode = g.target(typename Graph::Arc(e));
-  if (start != INVALID) {
-    check(firstNode == start, "checkEulerIt: Wrong first node");
-  }
+  EulerIt<Graph> e(g);
+  typename Graph::Node firstNode = g.u(e);
+  typename Graph::Node lastNode = g.v(e);
 
-  for (; e != INVALID; ++e) {
-    if (e != INVALID) lastNode = g.target(typename Graph::Arc(e));
+  for (; e != INVALID; ++e)
+  {
+    if (e != INVALID)
+    {
+      lastNode = g.v(e);
+    }
     ++visitationNumber[e];
   }
 
   check(firstNode == lastNode,
-      "checkEulerIt: First and last nodes are not the same");
+      "checkEulerIt: first and last node are not the same");
 
   for (typename Graph::EdgeIt e(g); e != INVALID; ++e)
   {
     check(visitationNumber[e] == 1,
-        "checkEulerIt: Not visited or multiple times visited edge found");
+        "checkEulerIt: not visited or multiple times visited edge found");
   }
 }
@@ -85,138 +82,71 @@
 {
   typedef ListDigraph Digraph;
-  typedef Undirector<Digraph> Graph;
-  
+  typedef ListGraph Graph;
+
+  Digraph digraphWithEulerianCircuit;
   {
-    Digraph d;
-    Graph g(d);
-    
-    checkDiEulerIt(d);
-    checkDiEulerIt(g);
-    checkEulerIt(g);
+    Digraph& g = digraphWithEulerianCircuit;
 
-    check(eulerian(d), "This graph is Eulerian");
-    check(eulerian(g), "This graph is Eulerian");
+    Digraph::Node n0 = g.addNode();
+    Digraph::Node n1 = g.addNode();
+    Digraph::Node n2 = g.addNode();
+
+    g.addArc(n0, n1);
+    g.addArc(n1, n0);
+    g.addArc(n1, n2);
+    g.addArc(n2, n1);
   }
+
+  Digraph digraphWithoutEulerianCircuit;
   {
-    Digraph d;
-    Graph g(d);
-    Digraph::Node n = d.addNode();
+    Digraph& g = digraphWithoutEulerianCircuit;
 
-    checkDiEulerIt(d);
-    checkDiEulerIt(g);
-    checkEulerIt(g);
+    Digraph::Node n0 = g.addNode();
+    Digraph::Node n1 = g.addNode();
+    Digraph::Node n2 = g.addNode();
 
-    check(eulerian(d), "This graph is Eulerian");
-    check(eulerian(g), "This graph is Eulerian");
+    g.addArc(n0, n1);
+    g.addArc(n1, n0);
+    g.addArc(n1, n2);
   }
+
+  Graph graphWithEulerianCircuit;
   {
-    Digraph d;
-    Graph g(d);
-    Digraph::Node n = d.addNode();
-    d.addArc(n, n);
+    Graph& g = graphWithEulerianCircuit;
 
-    checkDiEulerIt(d);
-    checkDiEulerIt(g);
-    checkEulerIt(g);
+    Graph::Node n0 = g.addNode();
+    Graph::Node n1 = g.addNode();
+    Graph::Node n2 = g.addNode();
 
-    check(eulerian(d), "This graph is Eulerian");
-    check(eulerian(g), "This graph is Eulerian");
+    g.addEdge(n0, n1);
+    g.addEdge(n1, n2);
+    g.addEdge(n2, n0);
   }
+
+  Graph graphWithoutEulerianCircuit;
   {
-    Digraph d;
-    Graph g(d);
-    Digraph::Node n1 = d.addNode();
-    Digraph::Node n2 = d.addNode();
-    Digraph::Node n3 = d.addNode();
-    
-    d.addArc(n1, n2);
-    d.addArc(n2, n1);
-    d.addArc(n2, n3);
-    d.addArc(n3, n2);
+    Graph& g = graphWithoutEulerianCircuit;
 
-    checkDiEulerIt(d);
-    checkDiEulerIt(d, n2);
-    checkDiEulerIt(g);
-    checkDiEulerIt(g, n2);
-    checkEulerIt(g);
-    checkEulerIt(g, n2);
+    Graph::Node n0 = g.addNode();
+    Graph::Node n1 = g.addNode();
+    Graph::Node n2 = g.addNode();
 
-    check(eulerian(d), "This graph is Eulerian");
-    check(eulerian(g), "This graph is Eulerian");
+    g.addEdge(n0, n1);
+    g.addEdge(n1, n2);
   }
-  {
-    Digraph d;
-    Graph g(d);
-    Digraph::Node n1 = d.addNode();
-    Digraph::Node n2 = d.addNode();
-    Digraph::Node n3 = d.addNode();
-    Digraph::Node n4 = d.addNode();
-    Digraph::Node n5 = d.addNode();
-    Digraph::Node n6 = d.addNode();
-    
-    d.addArc(n1, n2);
-    d.addArc(n2, n4);
-    d.addArc(n1, n3);
-    d.addArc(n3, n4);
-    d.addArc(n4, n1);
-    d.addArc(n3, n5);
-    d.addArc(n5, n2);
-    d.addArc(n4, n6);
-    d.addArc(n2, n6);
-    d.addArc(n6, n1);
-    d.addArc(n6, n3);
 
-    checkDiEulerIt(d);
-    checkDiEulerIt(d, n1);
-    checkDiEulerIt(d, n5);
+  checkDiEulerIt(digraphWithEulerianCircuit);
 
-    checkDiEulerIt(g);
-    checkDiEulerIt(g, n1);
-    checkDiEulerIt(g, n5);
-    checkEulerIt(g);
-    checkEulerIt(g, n1);
-    checkEulerIt(g, n5);
+  checkEulerIt(graphWithEulerianCircuit);
 
-    check(eulerian(d), "This graph is Eulerian");
-    check(eulerian(g), "This graph is Eulerian");
-  }
-  {
-    Digraph d;
-    Graph g(d);
-    Digraph::Node n0 = d.addNode();
-    Digraph::Node n1 = d.addNode();
-    Digraph::Node n2 = d.addNode();
-    Digraph::Node n3 = d.addNode();
-    Digraph::Node n4 = d.addNode();
-    Digraph::Node n5 = d.addNode();
-    
-    d.addArc(n1, n2);
-    d.addArc(n2, n3);
-    d.addArc(n3, n1);
+  check(eulerian(digraphWithEulerianCircuit),
+      "this graph should have an Eulerian circuit");
+  check(!eulerian(digraphWithoutEulerianCircuit),
+      "this graph should not have an Eulerian circuit");
 
-    checkDiEulerIt(d);
-    checkDiEulerIt(d, n2);
-
-    checkDiEulerIt(g);
-    checkDiEulerIt(g, n2);
-    checkEulerIt(g);
-    checkEulerIt(g, n2);
-
-    check(!eulerian(d), "This graph is not Eulerian");
-    check(!eulerian(g), "This graph is not Eulerian");
-  }
-  {
-    Digraph d;
-    Graph g(d);
-    Digraph::Node n1 = d.addNode();
-    Digraph::Node n2 = d.addNode();
-    Digraph::Node n3 = d.addNode();
-    
-    d.addArc(n1, n2);
-    d.addArc(n2, n3);
-
-    check(!eulerian(d), "This graph is not Eulerian");
-    check(!eulerian(g), "This graph is not Eulerian");
-  }
+  check(eulerian(graphWithEulerianCircuit),
+      "this graph should have an Eulerian circuit");
+  check(!eulerian(graphWithoutEulerianCircuit),
+      "this graph should have an Eulerian circuit");
 
   return 0;
Index: test/max_matching_test.cc
===================================================================
--- test/max_matching_test.cc	(revision 440)
+++ test/max_matching_test.cc	(revision 585)
@@ -21,10 +21,12 @@
 #include <vector>
 #include <queue>
-#include <lemon/math.h>
 #include <cstdlib>
 
 #include <lemon/max_matching.h>
 #include <lemon/smart_graph.h>
+#include <lemon/concepts/graph.h>
+#include <lemon/concepts/maps.h>
 #include <lemon/lgf_reader.h>
+#include <lemon/math.h>
 
 #include "test_tools.h"
@@ -111,4 +113,116 @@
 };
 
+void checkMaxMatchingCompile()
+{
+  typedef concepts::Graph Graph;
+  typedef Graph::Node Node;
+  typedef Graph::Edge Edge;
+  typedef Graph::EdgeMap<bool> MatMap;
+
+  Graph g;
+  Node n;
+  Edge e;
+  MatMap mat(g);
+
+  MaxMatching<Graph> mat_test(g);
+  const MaxMatching<Graph>&
+    const_mat_test = mat_test;
+
+  mat_test.init();
+  mat_test.greedyInit();
+  mat_test.matchingInit(mat);
+  mat_test.startSparse();
+  mat_test.startDense();
+  mat_test.run();
+  
+  const_mat_test.matchingSize();
+  const_mat_test.matching(e);
+  const_mat_test.matching(n);
+  const MaxMatching<Graph>::MatchingMap& mmap =
+    const_mat_test.matchingMap();
+  e = mmap[n];
+  const_mat_test.mate(n);
+
+  MaxMatching<Graph>::Status stat = 
+    const_mat_test.status(n);
+  const MaxMatching<Graph>::StatusMap& smap =
+    const_mat_test.statusMap();
+  stat = smap[n];
+  const_mat_test.barrier(n);
+}
+
+void checkMaxWeightedMatchingCompile()
+{
+  typedef concepts::Graph Graph;
+  typedef Graph::Node Node;
+  typedef Graph::Edge Edge;
+  typedef Graph::EdgeMap<int> WeightMap;
+
+  Graph g;
+  Node n;
+  Edge e;
+  WeightMap w(g);
+
+  MaxWeightedMatching<Graph> mat_test(g, w);
+  const MaxWeightedMatching<Graph>&
+    const_mat_test = mat_test;
+
+  mat_test.init();
+  mat_test.start();
+  mat_test.run();
+  
+  const_mat_test.matchingWeight();
+  const_mat_test.matchingSize();
+  const_mat_test.matching(e);
+  const_mat_test.matching(n);
+  const MaxWeightedMatching<Graph>::MatchingMap& mmap =
+    const_mat_test.matchingMap();
+  e = mmap[n];
+  const_mat_test.mate(n);
+  
+  int k = 0;
+  const_mat_test.dualValue();
+  const_mat_test.nodeValue(n);
+  const_mat_test.blossomNum();
+  const_mat_test.blossomSize(k);
+  const_mat_test.blossomValue(k);
+}
+
+void checkMaxWeightedPerfectMatchingCompile()
+{
+  typedef concepts::Graph Graph;
+  typedef Graph::Node Node;
+  typedef Graph::Edge Edge;
+  typedef Graph::EdgeMap<int> WeightMap;
+
+  Graph g;
+  Node n;
+  Edge e;
+  WeightMap w(g);
+
+  MaxWeightedPerfectMatching<Graph> mat_test(g, w);
+  const MaxWeightedPerfectMatching<Graph>&
+    const_mat_test = mat_test;
+
+  mat_test.init();
+  mat_test.start();
+  mat_test.run();
+  
+  const_mat_test.matchingWeight();
+  const_mat_test.matching(e);
+  const_mat_test.matching(n);
+  const MaxWeightedPerfectMatching<Graph>::MatchingMap& mmap =
+    const_mat_test.matchingMap();
+  e = mmap[n];
+  const_mat_test.mate(n);
+  
+  int k = 0;
+  const_mat_test.dualValue();
+  const_mat_test.nodeValue(n);
+  const_mat_test.blossomNum();
+  const_mat_test.blossomSize(k);
+  const_mat_test.blossomValue(k);
+}
+
 void checkMatching(const SmartGraph& graph,
                    const MaxMatching<SmartGraph>& mm) {
@@ -121,7 +235,7 @@
 
   for (NodeIt n(graph); n != INVALID; ++n) {
-    check(mm.decomposition(n) == MaxMatching<SmartGraph>::EVEN ||
+    check(mm.status(n) == MaxMatching<SmartGraph>::EVEN ||
           mm.matching(n) != INVALID, "Wrong Gallai-Edmonds decomposition");
-    if (mm.decomposition(n) == MaxMatching<SmartGraph>::ODD) {
+    if (mm.status(n) == MaxMatching<SmartGraph>::ODD) {
       ++barrier_num;
     } else {
@@ -136,14 +250,14 @@
       ++num;
     }
-    check(mm.decomposition(graph.u(e)) != MaxMatching<SmartGraph>::EVEN ||
-          mm.decomposition(graph.v(e)) != MaxMatching<SmartGraph>::MATCHED,
+    check(mm.status(graph.u(e)) != MaxMatching<SmartGraph>::EVEN ||
+          mm.status(graph.v(e)) != MaxMatching<SmartGraph>::MATCHED,
           "Wrong Gallai-Edmonds decomposition");
 
-    check(mm.decomposition(graph.v(e)) != MaxMatching<SmartGraph>::EVEN ||
-          mm.decomposition(graph.u(e)) != MaxMatching<SmartGraph>::MATCHED,
+    check(mm.status(graph.v(e)) != MaxMatching<SmartGraph>::EVEN ||
+          mm.status(graph.u(e)) != MaxMatching<SmartGraph>::MATCHED,
           "Wrong Gallai-Edmonds decomposition");
 
-    if (mm.decomposition(graph.u(e)) != MaxMatching<SmartGraph>::ODD &&
-        mm.decomposition(graph.v(e)) != MaxMatching<SmartGraph>::ODD) {
+    if (mm.status(graph.u(e)) != MaxMatching<SmartGraph>::ODD &&
+        mm.status(graph.v(e)) != MaxMatching<SmartGraph>::ODD) {
       comp.join(graph.u(e), graph.v(e));
     }
@@ -153,5 +267,5 @@
   int odd_comp_num = 0;
   for (NodeIt n(graph); n != INVALID; ++n) {
-    if (mm.decomposition(n) != MaxMatching<SmartGraph>::ODD) {
+    if (mm.status(n) != MaxMatching<SmartGraph>::ODD) {
       int root = comp.find(n);
       if (comp_root.find(root) == comp_root.end()) {
