Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt	(revision 1088)
+++ test/CMakeLists.txt	(revision 1141)
@@ -55,4 +55,5 @@
   tsp_test
   unionfind_test
+  vf2_test
 )
 
Index: test/arc_look_up_test.cc
===================================================================
--- test/arc_look_up_test.cc	(revision 1092)
+++ test/arc_look_up_test.cc	(revision 1113)
@@ -25,5 +25,4 @@
 using namespace lemon;
 
-const int lgfn = 4;
 const std::string lgf =
   "@nodes\n"
Index: test/bellman_ford_test.cc
===================================================================
--- test/bellman_ford_test.cc	(revision 1092)
+++ test/bellman_ford_test.cc	(revision 1162)
@@ -101,5 +101,11 @@
     pp = const_bf_test.negativeCycle();
 
+#ifdef LEMON_CXX11
     for (BF::ActiveIt it(const_bf_test); it != INVALID; ++it) {}
+    for (auto n: const_bf_test.activeNodes()) { ::lemon::ignore_unused_variable_warning(n); }
+    for (Digraph::Node n: const_bf_test.activeNodes()) {
+      ::lemon::ignore_unused_variable_warning(n);
+    }
+#endif
   }
   {
Index: test/bpgraph_test.cc
===================================================================
--- test/bpgraph_test.cc	(revision 1092)
+++ test/bpgraph_test.cc	(revision 1100)
@@ -79,4 +79,5 @@
     e2 = G.addEdge(bn1, rn1),
     e3 = G.addEdge(rn1, bn2);
+  ::lemon::ignore_unused_variable_warning(e2,e3);
 
   checkGraphNodeList(G, 3);
@@ -120,4 +121,5 @@
     e1 = G.addEdge(n1, n2), e2 = G.addEdge(n1, n3),
     e3 = G.addEdge(n4, n2), e4 = G.addEdge(n4, n3);
+  ::lemon::ignore_unused_variable_warning(e1,e3,e4);
 
   // Check edge deletion
@@ -168,4 +170,5 @@
     e1 = G.addEdge(n1, n2), e2 = G.addEdge(n1, n3),
     e3 = G.addEdge(n4, n2), e4 = G.addEdge(n4, n3);
+  ::lemon::ignore_unused_variable_warning(e1,e3,e4);
 
   G.changeRed(e2, n4);
@@ -220,4 +223,5 @@
     e1 = G.addEdge(n1, n2),
     e2 = G.addEdge(n1, n3);
+  ::lemon::ignore_unused_variable_warning(e1,e2);
 
   checkGraphNodeList(G, 3);
@@ -305,4 +309,5 @@
     e1 = g.addEdge(n1, n2),
     e2 = g.addEdge(n1, n3);
+  ::lemon::ignore_unused_variable_warning(e2);
 
   check(g.valid(n1), "Wrong validity check");
Index: test/graph_test.h
===================================================================
--- test/graph_test.h	(revision 1092)
+++ test/graph_test.h	(revision 1131)
@@ -39,4 +39,25 @@
     check(n==INVALID,"Wrong Node list linking.");
     check(countNodes(G)==cnt,"Wrong Node number.");
+
+#ifdef LEMON_CXX11
+    {
+      typename Graph::NodeIt n(G);
+      for(auto u: G.nodes())
+        {
+          check(n==u,"Wrong STL Node iterator.");
+          ++n;
+        }
+      check(n==INVALID,"Wrong STL Node iterator.");
+    }
+    {
+      typename Graph::NodeIt n(G);
+      for(typename Graph::Node u: G.nodes())
+        {
+          check(n==u,"Wrong STL Node iterator.");
+          ++n;
+        }
+      check(n==INVALID,"Wrong STL Node iterator.");
+    }
+#endif
   }
 
@@ -57,4 +78,24 @@
     check(n==INVALID,"Wrong red Node list linking.");
     check(countRedNodes(G)==cnt,"Wrong red Node number.");
+#ifdef LEMON_CXX11
+    {
+      typename Graph::RedNodeIt n(G);
+      for(auto u: G.redNodes())
+        {
+          check(n==u,"Wrong STL RedNode iterator.");
+          ++n;
+        }
+      check(n==INVALID,"Wrong STL RedNode iterator.");
+    }
+    {
+      typename Graph::RedNodeIt n(G);
+      for(typename Graph::RedNode u: G.redNodes())
+        {
+          check(n==u,"Wrong STL RedNode iterator.");
+          ++n;
+        }
+      check(n==INVALID,"Wrong STL RedNode iterator.");
+    }
+#endif
   }
 
@@ -75,4 +116,25 @@
     check(n==INVALID,"Wrong blue Node list linking.");
     check(countBlueNodes(G)==cnt,"Wrong blue Node number.");
+#ifdef LEMON_CXX11
+    {
+      typename Graph::BlueNodeIt n(G);
+      for(auto u: G.blueNodes())
+        {
+          check(n==u,"Wrong STL BlueNode iterator.");
+          ++n;
+        }
+      check(n==INVALID,"Wrong STL BlueNode iterator.");
+    }
+    {
+      typename Graph::BlueNodeIt n(G);
+      for(typename Graph::BlueNode u: G.blueNodes())
+        {
+          check(n==u,"Wrong STL BlueNode iterator.");
+          ++n;
+        }
+      check(n==INVALID,"Wrong STL BlueNode iterator.");
+    }
+#endif
+
   }
 
@@ -91,4 +153,25 @@
     check(e==INVALID,"Wrong Arc list linking.");
     check(countArcs(G)==cnt,"Wrong Arc number.");
+#ifdef LEMON_CXX11
+    {
+      typename Graph::ArcIt a(G);
+      for(auto e: G.arcs())
+        {
+          check(a==e,"Wrong STL Arc iterator.");
+          ++a;
+        }
+      check(a==INVALID,"Wrong STL Arc iterator.");
+    }
+    {
+      typename Graph::ArcIt a(G);
+      for(typename Graph::Arc e: G.arcs())
+        {
+          check(a==e,"Wrong STL Arc iterator.");
+          ++a;
+        }
+      check(a==INVALID,"Wrong STL Arc iterator.");
+    }
+#endif
+
   }
 
@@ -106,4 +189,25 @@
     check(e==INVALID,"Wrong OutArc list linking.");
     check(countOutArcs(G,n)==cnt,"Wrong OutArc number.");
+#ifdef LEMON_CXX11
+    {
+      typename Graph::OutArcIt a(G,n);
+      for(auto e: G.outArcs(n))
+        {
+          check(a==e,"Wrong STL OutArc iterator.");
+          ++a;
+        }
+      check(a==INVALID,"Wrong STL OutArc iterator.");
+    }
+    {
+      typename Graph::OutArcIt a(G,n);
+      for(typename Graph::Arc e: G.outArcs(n))
+        {
+          check(a==e,"Wrong STL OutArc iterator.");
+          ++a;
+        }
+      check(a==INVALID,"Wrong STL OutArc iterator.");
+    }
+#endif
+
   }
 
@@ -121,4 +225,24 @@
     check(e==INVALID,"Wrong InArc list linking.");
     check(countInArcs(G,n)==cnt,"Wrong InArc number.");
+#ifdef LEMON_CXX11
+    {
+      typename Graph::InArcIt a(G,n);
+      for(auto e: G.inArcs(n))
+        {
+          check(a==e,"Wrong STL InArc iterator.");
+          ++a;
+        }
+      check(a==INVALID,"Wrong STL InArc iterator.");
+    }
+    {
+      typename Graph::InArcIt a(G,n);
+      for(typename Graph::Arc e: G.inArcs(n))
+        {
+          check(a==e,"Wrong STL InArc iterator.");
+          ++a;
+        }
+      check(a==INVALID,"Wrong STL InArc iterator.");
+    }
+#endif
   }
 
@@ -135,4 +259,25 @@
     check(e==INVALID,"Wrong Edge list linking.");
     check(countEdges(G)==cnt,"Wrong Edge number.");
+#ifdef LEMON_CXX11
+    {
+      typename Graph::EdgeIt a(G);
+      for(auto e: G.edges())
+        {
+          check(a==e,"Wrong STL Edge iterator.");
+          ++a;
+        }
+      check(a==INVALID,"Wrong STL Edge iterator.");
+    }
+    {
+      typename Graph::EdgeIt a(G);
+      for(typename Graph::Edge e: G.edges())
+        {
+          check(a==e,"Wrong STL Edge iterator.");
+          ++a;
+        }
+      check(a==INVALID,"Wrong STL Edge iterator.");
+    }
+#endif
+
   }
 
@@ -151,4 +296,25 @@
     check(e==INVALID,"Wrong IncEdge list linking.");
     check(countIncEdges(G,n)==cnt,"Wrong IncEdge number.");
+#ifdef LEMON_CXX11
+    {
+      typename Graph::IncEdgeIt a(G,n);
+      for(auto e: G.incEdges(n))
+        {
+          check(a==e,"Wrong STL IncEdge iterator.");
+          ++a;
+        }
+      check(a==INVALID,"Wrong STL IncEdge iterator.");
+    }
+    {
+      typename Graph::IncEdgeIt a(G,n);
+      for(typename Graph::Edge e: G.incEdges(n))
+        {
+          check(a==e,"Wrong STL IncEdge iterator.");
+          ++a;
+        }
+      check(a==INVALID,"Wrong STL IncEdge iterator.");
+    }
+#endif
+
   }
 
Index: test/lp_test.cc
===================================================================
--- test/lp_test.cc	(revision 1092)
+++ test/lp_test.cc	(revision 1131)
@@ -21,5 +21,5 @@
 #include "test_tools.h"
 #include <lemon/tolerance.h>
-
+#include <lemon/concept_check.h>
 #include <lemon/config.h>
 
@@ -40,4 +40,7 @@
 #endif
 
+#ifdef LEMON_HAVE_LP
+#include <lemon/lp.h>
+#endif
 using namespace lemon;
 
@@ -45,4 +48,9 @@
   int count=0;
   for (LpBase::ColIt c(lp); c!=INVALID; ++c) ++count;
+#ifdef LEMON_CXX11
+  int cnt = 0;
+  for(auto c: lp.cols()) { cnt++; ::lemon::ignore_unused_variable_warning(c); }
+  check(count == cnt, "Wrong STL iterator");
+#endif
   return count;
 }
@@ -51,4 +59,9 @@
   int count=0;
   for (LpBase::RowIt r(lp); r!=INVALID; ++r) ++count;
+#ifdef LEMON_CXX11
+  int cnt = 0;
+  for(auto r: lp.rows()) { cnt++; ::lemon::ignore_unused_variable_warning(r); }
+  check(count == cnt, "Wrong STL iterator");
+#endif
   return count;
 }
@@ -417,4 +430,13 @@
   lpTest(lp_skel);
 
+#ifdef LEMON_HAVE_LP
+  {
+    Lp lp,lp2;
+    lpTest(lp);
+    aTest(lp2);
+    cloneTest<Lp>();
+  }
+#endif
+
 #ifdef LEMON_HAVE_GLPK
   {
Index: test/maps_test.cc
===================================================================
--- test/maps_test.cc	(revision 1092)
+++ test/maps_test.cc	(revision 1131)
@@ -731,4 +731,28 @@
     check(n == 3, "Wrong number");
     check(map1.falseNum() == 3, "Wrong number");
+
+#ifdef LEMON_CXX11
+    {
+      int c = 0;
+      for(auto v: map1.items(false)) { c++; ::lemon::ignore_unused_variable_warning(v); }
+      check(c == map1.falseNum(), "Wrong number");
+    }
+    {
+      int c = 0;
+      for(auto v: map1.items(true)) { c++; ::lemon::ignore_unused_variable_warning(v); }
+      check(c == map1.trueNum(), "Wrong number");
+    }
+    {
+      int c = 0;
+      for(auto v: map1.falseKeys()) { c++; ::lemon::ignore_unused_variable_warning(v); }
+      check(c == map1.falseNum(), "Wrong number");
+    }
+    {
+      int c = 0;
+      for(auto v: map1.trueKeys()) { c++; ::lemon::ignore_unused_variable_warning(v); }
+      check(c == map1.trueNum(), "Wrong number");
+    }
+#endif
+
   }
 
@@ -781,4 +805,13 @@
     }
     check(n == num, "Wrong number");
+#ifdef LEMON_CXX11
+    {
+      int c = 0;
+      for(auto v: map1.items(0)) { c++; ::lemon::ignore_unused_variable_warning(v); }
+      check(c == (num + 1) / 2, "Wrong number");
+      for(auto v: map1.items(1)) { c++; ::lemon::ignore_unused_variable_warning(v); }
+      check(c == num, "Wrong number");
+    }
+#endif
 
   }
@@ -839,4 +872,14 @@
     }
     check(n == num, "Wrong number");
+
+#ifdef LEMON_CXX11
+    {
+      int c = 0;
+      for(auto v: map1.items(0.0)) { c++; ::lemon::ignore_unused_variable_warning(v); }
+      check(c == (num + 1) / 2, "Wrong number");
+      for(auto v: map1.items(1.0)) { c++; ::lemon::ignore_unused_variable_warning(v); }
+      check(c == num, "Wrong number");
+    }
+#endif
 
   }
Index: test/max_flow_test.cc
===================================================================
--- test/max_flow_test.cc	(revision 1168)
+++ test/max_flow_test.cc	(revision 1169)
@@ -67,4 +67,36 @@
   "target 8\n";
 
+char test_lgf_float[] =
+  "@nodes\n"
+  "label\n"
+  "0\n"
+  "1\n"
+  "2\n"
+  "3\n"
+  "4\n"
+  "5\n"
+  "6\n"
+  "7\n"
+  "8\n"
+  "9\n"
+  "@arcs\n"
+  "      capacity\n"
+  "0 1 0.1\n"
+  "0 2 0.1\n"
+  "0 3 0.1\n"
+  "1 4 0.1\n"
+  "2 4 0.1\n"
+  "3 4 0.1\n"
+  "4 5 0.3\n"
+  "5 6 0.1\n"
+  "5 7 0.1\n"
+  "5 8 0.1\n"
+  "6 9 0.1\n"
+  "7 9 0.1\n"
+  "8 9 0.1\n"
+  "@attributes\n"
+  "source 0\n"
+  "target 9\n";
+
 // Checks the general interface of a max flow algorithm
 template <typename GR, typename CAP>
@@ -259,8 +291,8 @@
   CapMap cap(g);
   std::istringstream input(input_lgf);
-  DigraphReader<Digraph>(g,input)
+  DigraphReader<Digraph>(g, input)
       .arcMap("capacity", cap)
-      .node("source",s)
-      .node("target",t)
+      .node("source", s)
+      .node("target", t)
       .run();
 
@@ -281,6 +313,6 @@
 
   FlowMap flow(g);
-  for (ArcIt e(g); e != INVALID; ++e) flow[e] = max_flow.flowMap()[e];
-  for (ArcIt e(g); e != INVALID; ++e) cap[e] = 2 * cap[e];
+  for (ArcIt e(g); e != INVALID; ++e) flow[e] = 13 * max_flow.flowMap()[e];
+  for (ArcIt e(g); e != INVALID; ++e) cap[e] = 17 * cap[e];
   max_flow.init(flow);
 
@@ -291,7 +323,7 @@
   min_cut_value = cutValue(g, min_cut1, cap);
 
-  check(!tol.different(2 * expected, max_flow.flowValue()),
+  check(!tol.different(17 * expected, max_flow.flowValue()),
         "Incorrect max flow value.");
-  check(!tol.different(2 * expected, min_cut_value),
+  check(!tol.different(17 * expected, min_cut_value),
         "Incorrect min cut value.");
 
@@ -305,7 +337,7 @@
   min_cut_value = cutValue(g, min_cut2, cap);
 
-  check(!tol.different(2 * expected, max_flow.flowValue()),
+  check(!tol.different(17 * expected, max_flow.flowValue()),
         "Incorrect max flow value.");
-  check(!tol.different(2 * expected, min_cut_value),
+  check(!tol.different(17 * expected, min_cut_value),
         "Incorrect min cut value.");
 
@@ -383,7 +415,11 @@
   typedef Preflow<SmartDigraph, SmartDigraph::ArcMap<float> > PType2;
   typedef Preflow<SmartDigraph, SmartDigraph::ArcMap<double> > PType3;
+
   checkMaxFlowAlg<PType1, PreflowStartFunctions<PType1> >(test_lgf, 13);
   checkMaxFlowAlg<PType2, PreflowStartFunctions<PType2> >(test_lgf, 13);
   checkMaxFlowAlg<PType3, PreflowStartFunctions<PType3> >(test_lgf, 13);
+
+  checkMaxFlowAlg<PType2, PreflowStartFunctions<PType2> >(test_lgf_float, 0.3);
+  checkMaxFlowAlg<PType3, PreflowStartFunctions<PType3> >(test_lgf_float, 0.3);
 
   checkInitPreflow();
@@ -393,8 +429,12 @@
   typedef EdmondsKarp<SmartDigraph, SmartDigraph::ArcMap<float> > EKType2;
   typedef EdmondsKarp<SmartDigraph, SmartDigraph::ArcMap<double> > EKType3;
+
   checkMaxFlowAlg<EKType1, GeneralStartFunctions<EKType1> >(test_lgf, 13);
   checkMaxFlowAlg<EKType2, GeneralStartFunctions<EKType2> >(test_lgf, 13);
   checkMaxFlowAlg<EKType3, GeneralStartFunctions<EKType3> >(test_lgf, 13);
 
+  checkMaxFlowAlg<EKType2, GeneralStartFunctions<EKType2> >(test_lgf_float, 0.3);
+  checkMaxFlowAlg<EKType3, GeneralStartFunctions<EKType3> >(test_lgf_float, 0.3);
+
   return 0;
 }
Index: test/min_cost_flow_test.cc
===================================================================
--- test/min_cost_flow_test.cc	(revision 1092)
+++ test/min_cost_flow_test.cc	(revision 1118)
@@ -396,4 +396,10 @@
   checkMcf(mcf3, mcf3.run(param), neg2_gr, neg2_l, neg2_u, neg2_c, neg2_s,
            mcf3.OPTIMAL, true,     -300, test_str + "-18", GEQ);
+
+  // Tests for empty graph
+  Digraph gr0;
+  MCF mcf0(gr0);
+  mcf0.run(param);
+  check(mcf0.totalCost() == 0, "Wrong total cost");  
 }
 
Index: test/mip_test.cc
===================================================================
--- test/mip_test.cc	(revision 748)
+++ test/mip_test.cc	(revision 1105)
@@ -31,4 +31,8 @@
 #ifdef LEMON_HAVE_CBC
 #include <lemon/cbc.h>
+#endif
+
+#ifdef LEMON_HAVE_MIP
+#include <lemon/lp.h>
 #endif
 
@@ -129,4 +133,12 @@
 {
 
+#ifdef LEMON_HAVE_MIP
+  {
+    Mip mip1;
+    aTest(mip1);
+    cloneTest<Mip>();
+  }
+#endif
+
 #ifdef LEMON_HAVE_GLPK
   {
Index: test/radix_sort_test.cc
===================================================================
--- test/radix_sort_test.cc	(revision 1092)
+++ test/radix_sort_test.cc	(revision 1135)
@@ -16,4 +16,6 @@
  *
  */
+
+#include <lemon/core.h>
 
 #include <lemon/time_measure.h>
Index: test/tsp_test.cc
===================================================================
--- test/tsp_test.cc	(revision 1092)
+++ test/tsp_test.cc	(revision 1106)
@@ -67,10 +67,11 @@
 
   int node_cnt = 0;
-  for (typename Container::const_iterator it = p.begin(); it != p.end(); ++it) {
-    FullGraph::Node node = *it;
-    if (used[node]) return false;
-    used[node] = true;
-    ++node_cnt;
-  }
+  for (typename Container::const_iterator it = p.begin(); it != p.end(); ++it)
+    {
+      FullGraph::Node node = *it;
+      if (used[node]) return false;
+      used[node] = true;
+      ++node_cnt;
+    }
 
   return (node_cnt == gr.nodeNum());
@@ -132,5 +133,6 @@
     int esize = n <= 1 ? 0 : n;
 
-    TSP alg(g, constMap<Edge, int>(1));
+    ConstMap<Edge, int> cost_map(1);
+    TSP alg(g, cost_map);
 
     check(alg.run() == esize, alg_name + ": Wrong total cost");
@@ -265,6 +267,8 @@
   tspTestSmall<GreedyTsp<ConstMap<Edge, int> > >("Greedy");
   tspTestSmall<NearestInsertionTsp<ConstMap<Edge, int> > >("Nearest Insertion");
-  tspTestSmall<FarthestInsertionTsp<ConstMap<Edge, int> > >("Farthest Insertion");
-  tspTestSmall<CheapestInsertionTsp<ConstMap<Edge, int> > >("Cheapest Insertion");
+  tspTestSmall<FarthestInsertionTsp<ConstMap<Edge, int> > >
+    ("Farthest Insertion");
+  tspTestSmall<CheapestInsertionTsp<ConstMap<Edge, int> > >
+    ("Cheapest Insertion");
   tspTestSmall<RandomInsertionTsp<ConstMap<Edge, int> > >("Random Insertion");
   tspTestSmall<ChristofidesTsp<ConstMap<Edge, int> > >("Christofides");
Index: test/vf2_test.cc
===================================================================
--- test/vf2_test.cc	(revision 1143)
+++ test/vf2_test.cc	(revision 1143)
@@ -0,0 +1,366 @@
+/* -*- mode: C++; indent-tabs-mode: nil; -*-
+ *
+ * This file is a part of LEMON, a generic C++ optimization library.
+ *
+ * Copyright (C) 2015
+ * EMAXA Kutato-fejleszto Kft. (EMAXA Research Ltd.)
+ *
+ * Permission to use, modify and distribute this software is granted
+ * provided that this copyright notice appears in all copies. For
+ * precise terms see the accompanying LICENSE file.
+ *
+ * This software is provided "AS IS" with no warranty of any kind,
+ * express or implied, and with no claim as to its suitability for any
+ * purpose.
+ *
+ */
+
+#include <lemon/vf2.h>
+#include <lemon/concepts/digraph.h>
+#include <lemon/smart_graph.h>
+#include <lemon/lgf_reader.h>
+#include <lemon/concepts/maps.h>
+
+#include <test/test_tools.h>
+#include <sstream>
+
+using namespace lemon;
+
+char petersen_lgf[] =
+  "@nodes\n"
+  "label col1 col2\n"
+  "0 1 1\n"
+  "1 1 2\n"
+  "2 1 3\n"
+  "3 1 4\n"
+  "4 2 5\n"
+  "5 2 1\n"
+  "6 2 2\n"
+  "7 2 3\n"
+  "8 2 4\n"
+  "9 2 5\n"
+  "@arcs\n"
+  "     -\n"
+  "0 1\n"
+  "1 2\n"
+  "2 3\n"
+  "3 4\n"
+  "4 0\n"
+  "0 5\n"
+  "1 6\n"
+  "2 7\n"
+  "3 8\n"
+  "4 9\n"
+  "5 8\n"
+  "5 7\n"
+  "9 6\n"
+  "9 7\n"
+  "6 8\n";
+
+char c5_lgf[] =
+  "@nodes\n"
+  "label col\n"
+  "0 1\n"
+  "1 2\n"
+  "2 3\n"
+  "3 4\n"
+  "4 5\n"
+  "@arcs\n"
+  "     -\n"
+  "0 1\n"
+  "1 2\n"
+  "2 3\n"
+  "3 4\n"
+  "4 0\n";
+
+char c7_lgf[] =
+  "@nodes\n"
+  "label\n"
+  "0\n"
+  "1\n"
+  "2\n"
+  "3\n"
+  "4\n"
+  "5\n"
+  "6\n"
+  "@arcs\n"
+  "     -\n"
+  "0 1\n"
+  "1 2\n"
+  "2 3\n"
+  "3 4\n"
+  "4 5\n"
+  "5 6\n"
+  "6 0\n";
+
+char c10_lgf[] =
+  "@nodes\n"
+  "label\n"
+  "0\n"
+  "1\n"
+  "2\n"
+  "3\n"
+  "4\n"
+  "5\n"
+  "6\n"
+  "7\n"
+  "8\n"
+  "9\n"
+  "@arcs\n"
+  "     -\n"
+  "0 1\n"
+  "1 2\n"
+  "2 3\n"
+  "3 4\n"
+  "4 5\n"
+  "5 6\n"
+  "6 7\n"
+  "7 8\n"
+  "8 9\n"
+  "9 0\n";
+
+char p10_lgf[] =
+  "@nodes\n"
+  "label\n"
+  "0\n"
+  "1\n"
+  "2\n"
+  "3\n"
+  "4\n"
+  "5\n"
+  "6\n"
+  "7\n"
+  "8\n"
+  "9\n"
+  "@arcs\n"
+  "     -\n"
+  "0 1\n"
+  "1 2\n"
+  "2 3\n"
+  "3 4\n"
+  "4 5\n"
+  "5 6\n"
+  "6 7\n"
+  "7 8\n"
+  "8 9\n";
+
+SmartGraph petersen, c5, c7, c10, p10;
+SmartGraph::NodeMap<int> petersen_col1(petersen);
+SmartGraph::NodeMap<int> petersen_col2(petersen);
+SmartGraph::NodeMap<int> c5_col(c5);
+
+void make_graphs() {
+  std::stringstream ss(petersen_lgf);
+  graphReader(petersen, ss)
+    .nodeMap("col1",petersen_col1)
+    .nodeMap("col2",petersen_col2)
+    .run();
+
+  ss.clear();
+  ss.str("");
+  ss<<c5_lgf;
+  //std::stringstream ss2(c5_lgf);
+  graphReader(c5, ss)
+    .nodeMap("col",c5_col)
+    .run();
+
+  ss.clear();
+  ss.str("");
+  ss<<c7_lgf;
+  graphReader(c7, ss).run();
+
+  ss.clear();
+  ss.str("");
+  ss<<c10_lgf;
+  graphReader(c10, ss).run();
+
+  ss.clear();
+  ss.str("");
+  ss<<p10_lgf;
+  graphReader(p10, ss).run();
+
+}
+
+class EqComparable {
+public:
+  bool operator==(const EqComparable&) { return false; }
+};
+
+template<class A, class B>
+class EqClass {
+public:
+  bool operator()(A, B) { return false; }
+};
+
+template<class G1,class G2>
+void checkVf2Compile()
+{
+  G1 g;
+  G2 h;
+  concepts::ReadWriteMap<typename G1::Node, typename G2::Node> r;
+  bool succ;
+  ::lemon::ignore_unused_variable_warning(succ);
+
+  succ = vf2(g,h).run();
+  succ = vf2(g,h).induced().run();
+  succ = vf2(g,h).iso().run();
+  succ = vf2(g,h).mapping(r).run();
+  succ = vf2(g,h).induced().mapping(r).run();
+  succ = vf2(g,h).iso().mapping(r).run();
+  concepts::ReadMap<typename G1::Node, EqComparable> l1;
+  concepts::ReadMap<typename G2::Node, EqComparable> l2;
+  succ = vf2(g,h).nodeLabels(l1,l2).mapping(r).run();
+  succ = vf2(g,h).nodeEq(EqClass<typename G1::Node,typename G2::Node>())
+    .mapping(r).run();
+}
+
+void justCompile()
+{
+  checkVf2Compile<concepts::Graph,concepts::Graph>();
+  checkVf2Compile<concepts::Graph,SmartGraph>();
+  checkVf2Compile<SmartGraph,concepts::Graph>();
+}
+
+template<class G1, class G2, class I>
+void checkSub(const G1 &g1, const G2 &g2, const I &i)
+{
+  {
+    std::set<typename G2::Node> image;
+    for(typename G1::NodeIt n(g1);n!=INVALID;++n)
+      {
+          check(i[n]!=INVALID, "Wrong isomorphism: incomplete mapping.");
+          check(image.count(i[n])==0,"Wrong isomorphism: not injective.");
+          image.insert(i[n]);
+      }
+  }
+  for(typename G1::EdgeIt e(g1);e!=INVALID;++e)
+    check(findEdge(g2,i[g1.u(e)],i[g1.v(e)])!=INVALID,
+          "Wrong isomorphism: missing edge(checkSub).");
+}
+
+template<class G1, class G2, class I>
+void checkInd(const G1 &g1, const G2 &g2, const I &i)
+  {
+  std::set<typename G2::Node> image;
+  for(typename G1::NodeIt n(g1);n!=INVALID;++n)
+    {
+    check(i[n]!=INVALID, "Wrong isomorphism: incomplete mapping.");
+    check(image.count(i[n])==0,"Wrong isomorphism: not injective.");
+    image.insert(i[n]);
+    }
+  for(typename G1::NodeIt n(g1); n!=INVALID; ++n)
+    for(typename G1::NodeIt m(g1); m!=INVALID; ++m)
+      if((findEdge(g1,n,m)==INVALID) != (findEdge(g2,i[n],i[m])==INVALID))
+        {
+        std::cout << "Wrong isomorphism: edge mismatch";
+        exit(1);
+        }
+  }
+
+template<class G1,class G2>
+int checkSub(const G1 &g1, const G2 &g2)
+{
+  typename G1:: template NodeMap<typename G2::Node> iso(g1,INVALID);
+  if(vf2(g1,g2).mapping(iso).run())
+    {
+      checkSub(g1,g2,iso);
+      return true;
+    }
+  else return false;
+}
+
+template<class G1,class G2>
+int checkInd(const G1 &g1, const G2 &g2)
+{
+  typename G1:: template NodeMap<typename G2::Node> iso(g1,INVALID);
+  if(vf2(g1,g2).induced().mapping(iso).run())
+    {
+      checkInd(g1,g2,iso);
+      return true;
+    }
+  else return false;
+}
+
+template<class G1,class G2>
+int checkIso(const G1 &g1, const G2 &g2)
+{
+  typename G1:: template NodeMap<typename G2::Node> iso(g1,INVALID);
+  if(vf2(g1,g2).iso().mapping(iso).run())
+    {
+      check(countNodes(g1)==countNodes(g2),
+            "Wrong iso alg.: they are not isomophic.");
+      checkInd(g1,g2,iso);
+      return true;
+    }
+  else return false;
+}
+
+template<class G1, class G2, class L1, class L2, class I>
+void checkLabel(const G1 &g1, const G2 &,
+                const L1 &l1, const L2 &l2,const I &i)
+{
+  for(typename G1::NodeIt n(g1);n!=INVALID;++n)
+    {
+      check(l1[n]==l2[i[n]],"Wrong isomorphism: label mismatch.");
+    }
+}
+
+template<class G1,class G2,class L1,class L2>
+int checkSub(const G1 &g1, const G2 &g2, const L1 &l1, const L2 &l2)
+{
+  typename G1:: template NodeMap<typename G2::Node> iso(g1,INVALID);
+  if(vf2(g1,g2).nodeLabels(l1,l2).mapping(iso).run())
+    {
+      checkSub(g1,g2,iso);
+      checkLabel(g1,g2,l1,l2,iso);
+      return true;
+    }
+  else return false;
+}
+
+int main() {
+  make_graphs();
+  check(checkSub(c5,petersen), "There should exist a C5->Petersen mapping.");
+  check(!checkSub(c7,petersen),
+        "There should not exist a C7->Petersen mapping.");
+  check(checkSub(p10,petersen), "There should exist a P10->Petersen mapping.");
+  check(!checkSub(c10,petersen),
+        "There should not exist a C10->Petersen mapping.");
+  check(checkSub(petersen,petersen),
+        "There should exist a Petersen->Petersen mapping.");
+
+  check(checkInd(c5,petersen),
+        "There should exist a C5->Petersen spanned mapping.");
+  check(!checkInd(c7,petersen),
+        "There should exist a C7->Petersen spanned mapping.");
+  check(!checkInd(p10,petersen),
+        "There should not exist a P10->Petersen spanned mapping.");
+  check(!checkInd(c10,petersen),
+        "There should not exist a C10->Petersen spanned mapping.");
+  check(checkInd(petersen,petersen),
+        "There should exist a Petersen->Petersen spanned mapping.");
+
+  check(!checkSub(petersen,c10),
+        "There should not exist a Petersen->C10 mapping.");
+  check(checkSub(p10,c10),
+        "There should exist a P10->C10 mapping.");
+  check(!checkInd(p10,c10),
+        "There should not exist a P10->C10 spanned mapping.");
+  check(!checkSub(c10,p10),
+        "There should not exist a C10->P10 mapping.");
+
+  check(!checkIso(p10,c10),
+        "P10 and C10 are not isomorphic.");
+  check(checkIso(c10,c10),
+        "C10 and C10 are isomorphic.");
+
+  check(!vf2(p10,c10).iso().run(),
+        "P10 and C10 are not isomorphic.");
+  check(vf2(c10,c10).iso().run(),
+        "C10 and C10 are isomorphic.");
+
+  check(!checkSub(c5,petersen,c5_col,petersen_col1),
+        "There should exist a C5->Petersen mapping.");
+  check(checkSub(c5,petersen,c5_col,petersen_col2),
+        "There should exist a C5->Petersen mapping.");
+}
