Index: test/CMakeLists.txt
===================================================================
--- test/CMakeLists.txt	(revision 481)
+++ test/CMakeLists.txt	(revision 468)
@@ -19,6 +19,4 @@
   heap_test
   kruskal_test
-  lp_test
-  mip_test
   maps_test
   max_matching_test
Index: test/Makefile.am
===================================================================
--- test/Makefile.am	(revision 481)
+++ test/Makefile.am	(revision 468)
@@ -34,11 +34,4 @@
 	test/unionfind_test
 
-if HAVE_LP
-check_PROGRAMS += test/lp_test
-endif HAVE_LP
-if HAVE_MIP
-check_PROGRAMS += test/mip_test
-endif HAVE_MIP
-
 TESTS += $(check_PROGRAMS)
 XFAIL_TESTS += test/test_tools_fail$(EXEEXT)
@@ -59,7 +52,5 @@
 test_kruskal_test_SOURCES = test/kruskal_test.cc
 test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc
-test_lp_test_SOURCES = test/lp_test.cc
 test_maps_test_SOURCES = test/maps_test.cc
-test_mip_test_SOURCES = test/mip_test.cc
 test_max_matching_test_SOURCES = test/max_matching_test.cc
 test_path_test_SOURCES = test/path_test.cc
Index: test/graph_adaptor_test.cc
===================================================================
--- test/graph_adaptor_test.cc	(revision 463)
+++ test/graph_adaptor_test.cc	(revision 486)
@@ -17,27 +17,39 @@
  */
 
-#include<iostream>
-#include<lemon/concept_check.h>
-
-#include<lemon/list_graph.h>
-#include<lemon/smart_graph.h>
-
-#include<lemon/concepts/digraph.h>
-#include<lemon/concepts/graph.h>
-
-#include<lemon/adaptors.h>
-
+#include <iostream>
 #include <limits>
+
+#include <lemon/list_graph.h>
+#include <lemon/grid_graph.h>
 #include <lemon/bfs.h>
 #include <lemon/path.h>
 
-#include"test/test_tools.h"
-#include"test/graph_test.h"
+#include <lemon/concepts/digraph.h>
+#include <lemon/concepts/graph.h>
+#include <lemon/concepts/graph_components.h>
+#include <lemon/concepts/maps.h>
+#include <lemon/concept_check.h>
+
+#include <lemon/adaptors.h>
+
+#include "test/test_tools.h"
+#include "test/graph_test.h"
 
 using namespace lemon;
 
 void checkReverseDigraph() {
+  // Check concepts
   checkConcept<concepts::Digraph, ReverseDigraph<concepts::Digraph> >();
-
+  checkConcept<concepts::Digraph, ReverseDigraph<ListDigraph> >();
+  checkConcept<concepts::AlterableDigraphComponent<>,
+               ReverseDigraph<ListDigraph> >();
+  checkConcept<concepts::ExtendableDigraphComponent<>,
+               ReverseDigraph<ListDigraph> >();
+  checkConcept<concepts::ErasableDigraphComponent<>,
+               ReverseDigraph<ListDigraph> >();
+  checkConcept<concepts::ClearableDigraphComponent<>,
+               ReverseDigraph<ListDigraph> >();
+
+  // Create a digraph and an adaptor
   typedef ListDigraph Digraph;
   typedef ReverseDigraph<Digraph> Adaptor;
@@ -46,4 +58,5 @@
   Adaptor adaptor(digraph);
 
+  // Add nodes and arcs to the original digraph
   Digraph::Node n1 = digraph.addNode();
   Digraph::Node n2 = digraph.addNode();
@@ -54,4 +67,5 @@
   Digraph::Arc a3 = digraph.addArc(n2, n3);
 
+  // Check the adaptor
   checkGraphNodeList(adaptor, 3);
   checkGraphArcList(adaptor, 3);
@@ -72,16 +86,85 @@
   checkGraphArcMap(adaptor);
 
+  // Check the orientation of the arcs
   for (Adaptor::ArcIt a(adaptor); a != INVALID; ++a) {
     check(adaptor.source(a) == digraph.target(a), "Wrong reverse");
     check(adaptor.target(a) == digraph.source(a), "Wrong reverse");
   }
+
+  // Add and erase nodes and arcs in the digraph through the adaptor
+  Adaptor::Node n4 = adaptor.addNode();
+
+  Adaptor::Arc a4 = adaptor.addArc(n4, n3);
+  Adaptor::Arc a5 = adaptor.addArc(n2, n4);
+  Adaptor::Arc a6 = adaptor.addArc(n2, n4);
+  Adaptor::Arc a7 = adaptor.addArc(n1, n4);
+  Adaptor::Arc a8 = adaptor.addArc(n1, n2);
+
+  adaptor.erase(a1);
+  adaptor.erase(n3);
+
+  // Check the adaptor
+  checkGraphNodeList(adaptor, 3);
+  checkGraphArcList(adaptor, 4);
+  checkGraphConArcList(adaptor, 4);
+
+  checkGraphOutArcList(adaptor, n1, 2);
+  checkGraphOutArcList(adaptor, n2, 2);
+  checkGraphOutArcList(adaptor, n4, 0);
+
+  checkGraphInArcList(adaptor, n1, 0);
+  checkGraphInArcList(adaptor, n2, 1);
+  checkGraphInArcList(adaptor, n4, 3);
+
+  checkNodeIds(adaptor);
+  checkArcIds(adaptor);
+
+  checkGraphNodeMap(adaptor);
+  checkGraphArcMap(adaptor);
+
+  // Check the digraph
+  checkGraphNodeList(digraph, 3);
+  checkGraphArcList(digraph, 4);
+  checkGraphConArcList(digraph, 4);
+
+  checkGraphOutArcList(digraph, n1, 0);
+  checkGraphOutArcList(digraph, n2, 1);
+  checkGraphOutArcList(digraph, n4, 3);
+
+  checkGraphInArcList(digraph, n1, 2);
+  checkGraphInArcList(digraph, n2, 2);
+  checkGraphInArcList(digraph, n4, 0);
+
+  checkNodeIds(digraph);
+  checkArcIds(digraph);
+
+  checkGraphNodeMap(digraph);
+  checkGraphArcMap(digraph);
+
+  // Check the conversion of nodes and arcs
+  Digraph::Node nd = n4;
+  nd = n4;
+  Adaptor::Node na = n1;
+  na = n2;
+  Digraph::Arc ad = a4;
+  ad = a5;
+  Adaptor::Arc aa = a1;
+  aa = a2;
 }
 
 void checkSubDigraph() {
-  checkConcept<concepts::Digraph,
-    SubDigraph<concepts::Digraph,
-    concepts::Digraph::NodeMap<bool>,
-    concepts::Digraph::ArcMap<bool> > >();
-
+  // Check concepts
+  checkConcept<concepts::Digraph, SubDigraph<concepts::Digraph> >();
+  checkConcept<concepts::Digraph, SubDigraph<ListDigraph> >();
+  checkConcept<concepts::AlterableDigraphComponent<>,
+               SubDigraph<ListDigraph> >();
+  checkConcept<concepts::ExtendableDigraphComponent<>,
+               SubDigraph<ListDigraph> >();
+  checkConcept<concepts::ErasableDigraphComponent<>,
+               SubDigraph<ListDigraph> >();
+  checkConcept<concepts::ClearableDigraphComponent<>,
+               SubDigraph<ListDigraph> >();
+
+  // Create a digraph and an adaptor
   typedef ListDigraph Digraph;
   typedef Digraph::NodeMap<bool> NodeFilter;
@@ -94,13 +177,15 @@
   Adaptor adaptor(digraph, node_filter, arc_filter);
 
+  // Add nodes and arcs to the original digraph and the adaptor
   Digraph::Node n1 = digraph.addNode();
   Digraph::Node n2 = digraph.addNode();
-  Digraph::Node n3 = digraph.addNode();
+  Adaptor::Node n3 = adaptor.addNode();
+
+  node_filter[n1] = node_filter[n2] = node_filter[n3] = true;
 
   Digraph::Arc a1 = digraph.addArc(n1, n2);
   Digraph::Arc a2 = digraph.addArc(n1, n3);
-  Digraph::Arc a3 = digraph.addArc(n2, n3);
-
-  node_filter[n1] = node_filter[n2] = node_filter[n3] = true;
+  Adaptor::Arc a3 = adaptor.addArc(n2, n3);
+
   arc_filter[a1] = arc_filter[a2] = arc_filter[a3] = true;
 
@@ -123,5 +208,8 @@
   checkGraphArcMap(adaptor);
 
-  arc_filter[a2] = false;
+  // Hide an arc
+  adaptor.status(a2, false);
+  adaptor.disable(a3);
+  if (!adaptor.status(a3)) adaptor.enable(a3);
 
   checkGraphNodeList(adaptor, 3);
@@ -143,5 +231,8 @@
   checkGraphArcMap(adaptor);
 
-  node_filter[n1] = false;
+  // Hide a node
+  adaptor.status(n1, false);
+  adaptor.disable(n3);
+  if (!adaptor.status(n3)) adaptor.enable(n3);
 
   checkGraphNodeList(adaptor, 2);
@@ -161,4 +252,5 @@
   checkGraphArcMap(adaptor);
 
+  // Hide all nodes and arcs
   node_filter[n1] = node_filter[n2] = node_filter[n3] = false;
   arc_filter[a1] = arc_filter[a2] = arc_filter[a3] = false;
@@ -173,11 +265,30 @@
   checkGraphNodeMap(adaptor);
   checkGraphArcMap(adaptor);
+
+  // Check the conversion of nodes and arcs
+  Digraph::Node nd = n3;
+  nd = n3;
+  Adaptor::Node na = n1;
+  na = n2;
+  Digraph::Arc ad = a3;
+  ad = a3;
+  Adaptor::Arc aa = a1;
+  aa = a2;
 }
 
 void checkFilterNodes1() {
-  checkConcept<concepts::Digraph,
-    FilterNodes<concepts::Digraph,
-      concepts::Digraph::NodeMap<bool> > >();
-
+  // Check concepts
+  checkConcept<concepts::Digraph, FilterNodes<concepts::Digraph> >();
+  checkConcept<concepts::Digraph, FilterNodes<ListDigraph> >();
+  checkConcept<concepts::AlterableDigraphComponent<>,
+               FilterNodes<ListDigraph> >();
+  checkConcept<concepts::ExtendableDigraphComponent<>,
+               FilterNodes<ListDigraph> >();
+  checkConcept<concepts::ErasableDigraphComponent<>,
+               FilterNodes<ListDigraph> >();
+  checkConcept<concepts::ClearableDigraphComponent<>,
+               FilterNodes<ListDigraph> >();
+
+  // Create a digraph and an adaptor
   typedef ListDigraph Digraph;
   typedef Digraph::NodeMap<bool> NodeFilter;
@@ -188,13 +299,14 @@
   Adaptor adaptor(digraph, node_filter);
 
+  // Add nodes and arcs to the original digraph and the adaptor
   Digraph::Node n1 = digraph.addNode();
   Digraph::Node n2 = digraph.addNode();
-  Digraph::Node n3 = digraph.addNode();
+  Adaptor::Node n3 = adaptor.addNode();
+
+  node_filter[n1] = node_filter[n2] = node_filter[n3] = true;
 
   Digraph::Arc a1 = digraph.addArc(n1, n2);
   Digraph::Arc a2 = digraph.addArc(n1, n3);
-  Digraph::Arc a3 = digraph.addArc(n2, n3);
-
-  node_filter[n1] = node_filter[n2] = node_filter[n3] = true;
+  Adaptor::Arc a3 = adaptor.addArc(n2, n3);
 
   checkGraphNodeList(adaptor, 3);
@@ -216,5 +328,8 @@
   checkGraphArcMap(adaptor);
 
-  node_filter[n1] = false;
+  // Hide a node
+  adaptor.status(n1, false);
+  adaptor.disable(n3);
+  if (!adaptor.status(n3)) adaptor.enable(n3);
 
   checkGraphNodeList(adaptor, 2);
@@ -234,4 +349,5 @@
   checkGraphArcMap(adaptor);
 
+  // Hide all nodes
   node_filter[n1] = node_filter[n2] = node_filter[n3] = false;
 
@@ -245,11 +361,30 @@
   checkGraphNodeMap(adaptor);
   checkGraphArcMap(adaptor);
+
+  // Check the conversion of nodes and arcs
+  Digraph::Node nd = n3;
+  nd = n3;
+  Adaptor::Node na = n1;
+  na = n2;
+  Digraph::Arc ad = a3;
+  ad = a3;
+  Adaptor::Arc aa = a1;
+  aa = a2;
 }
 
 void checkFilterArcs() {
-  checkConcept<concepts::Digraph,
-    FilterArcs<concepts::Digraph,
-    concepts::Digraph::ArcMap<bool> > >();
-
+  // Check concepts
+  checkConcept<concepts::Digraph, FilterArcs<concepts::Digraph> >();
+  checkConcept<concepts::Digraph, FilterArcs<ListDigraph> >();
+  checkConcept<concepts::AlterableDigraphComponent<>,
+               FilterArcs<ListDigraph> >();
+  checkConcept<concepts::ExtendableDigraphComponent<>,
+               FilterArcs<ListDigraph> >();
+  checkConcept<concepts::ErasableDigraphComponent<>,
+               FilterArcs<ListDigraph> >();
+  checkConcept<concepts::ClearableDigraphComponent<>,
+               FilterArcs<ListDigraph> >();
+
+  // Create a digraph and an adaptor
   typedef ListDigraph Digraph;
   typedef Digraph::ArcMap<bool> ArcFilter;
@@ -260,11 +395,12 @@
   Adaptor adaptor(digraph, arc_filter);
 
+  // Add nodes and arcs to the original digraph and the adaptor
   Digraph::Node n1 = digraph.addNode();
   Digraph::Node n2 = digraph.addNode();
-  Digraph::Node n3 = digraph.addNode();
+  Adaptor::Node n3 = adaptor.addNode();
 
   Digraph::Arc a1 = digraph.addArc(n1, n2);
   Digraph::Arc a2 = digraph.addArc(n1, n3);
-  Digraph::Arc a3 = digraph.addArc(n2, n3);
+  Adaptor::Arc a3 = adaptor.addArc(n2, n3);
 
   arc_filter[a1] = arc_filter[a2] = arc_filter[a3] = true;
@@ -288,5 +424,8 @@
   checkGraphArcMap(adaptor);
 
-  arc_filter[a2] = false;
+  // Hide an arc
+  adaptor.status(a2, false);
+  adaptor.disable(a3);
+  if (!adaptor.status(a3)) adaptor.enable(a3);
 
   checkGraphNodeList(adaptor, 3);
@@ -308,4 +447,5 @@
   checkGraphArcMap(adaptor);
 
+  // Hide all arcs
   arc_filter[a1] = arc_filter[a2] = arc_filter[a3] = false;
 
@@ -319,9 +459,31 @@
   checkGraphNodeMap(adaptor);
   checkGraphArcMap(adaptor);
+
+  // Check the conversion of nodes and arcs
+  Digraph::Node nd = n3;
+  nd = n3;
+  Adaptor::Node na = n1;
+  na = n2;
+  Digraph::Arc ad = a3;
+  ad = a3;
+  Adaptor::Arc aa = a1;
+  aa = a2;
 }
 
 void checkUndirector() {
+  // Check concepts
   checkConcept<concepts::Graph, Undirector<concepts::Digraph> >();
-
+  checkConcept<concepts::Graph, Undirector<ListDigraph> >();
+  checkConcept<concepts::AlterableGraphComponent<>,
+               Undirector<ListDigraph> >();
+  checkConcept<concepts::ExtendableGraphComponent<>,
+               Undirector<ListDigraph> >();
+  checkConcept<concepts::ErasableGraphComponent<>,
+               Undirector<ListDigraph> >();
+  checkConcept<concepts::ClearableGraphComponent<>,
+               Undirector<ListDigraph> >();
+
+
+  // Create a digraph and an adaptor
   typedef ListDigraph Digraph;
   typedef Undirector<Digraph> Adaptor;
@@ -330,12 +492,33 @@
   Adaptor adaptor(digraph);
 
+  // Add nodes and arcs/edges to the original digraph and the adaptor
   Digraph::Node n1 = digraph.addNode();
   Digraph::Node n2 = digraph.addNode();
-  Digraph::Node n3 = digraph.addNode();
+  Adaptor::Node n3 = adaptor.addNode();
 
   Digraph::Arc a1 = digraph.addArc(n1, n2);
   Digraph::Arc a2 = digraph.addArc(n1, n3);
-  Digraph::Arc a3 = digraph.addArc(n2, n3);
-
+  Adaptor::Edge e3 = adaptor.addEdge(n2, n3);
+
+  // Check the original digraph
+  checkGraphNodeList(digraph, 3);
+  checkGraphArcList(digraph, 3);
+  checkGraphConArcList(digraph, 3);
+
+  checkGraphOutArcList(digraph, n1, 2);
+  checkGraphOutArcList(digraph, n2, 1);
+  checkGraphOutArcList(digraph, n3, 0);
+
+  checkGraphInArcList(digraph, n1, 0);
+  checkGraphInArcList(digraph, n2, 1);
+  checkGraphInArcList(digraph, n3, 2);
+
+  checkNodeIds(digraph);
+  checkArcIds(digraph);
+
+  checkGraphNodeMap(digraph);
+  checkGraphArcMap(digraph);
+
+  // Check the adaptor
   checkGraphNodeList(adaptor, 3);
   checkGraphArcList(adaptor, 6);
@@ -344,15 +527,7 @@
   checkGraphConEdgeList(adaptor, 3);
 
-  checkGraphOutArcList(adaptor, n1, 2);
-  checkGraphOutArcList(adaptor, n2, 2);
-  checkGraphOutArcList(adaptor, n3, 2);
-
-  checkGraphInArcList(adaptor, n1, 2);
-  checkGraphInArcList(adaptor, n2, 2);
-  checkGraphInArcList(adaptor, n3, 2);
-
-  checkGraphIncEdgeList(adaptor, n1, 2);
-  checkGraphIncEdgeList(adaptor, n2, 2);
-  checkGraphIncEdgeList(adaptor, n3, 2);
+  checkGraphIncEdgeArcLists(adaptor, n1, 2);
+  checkGraphIncEdgeArcLists(adaptor, n2, 2);
+  checkGraphIncEdgeArcLists(adaptor, n3, 2);
 
   checkNodeIds(adaptor);
@@ -364,4 +539,5 @@
   checkGraphEdgeMap(adaptor);
 
+  // Check the edges of the adaptor
   for (Adaptor::EdgeIt e(adaptor); e != INVALID; ++e) {
     check(adaptor.u(e) == digraph.source(e), "Wrong undir");
@@ -369,12 +545,47 @@
   }
 
+  // Check CombinedArcMap
+  typedef Adaptor::CombinedArcMap
+    <Digraph::ArcMap<int>, Digraph::ArcMap<int> > IntCombinedMap;
+  typedef Adaptor::CombinedArcMap
+    <Digraph::ArcMap<bool>, Digraph::ArcMap<bool> > BoolCombinedMap;
+  checkConcept<concepts::ReferenceMap<Adaptor::Arc, int, int&, const int&>,
+    IntCombinedMap>();
+  checkConcept<concepts::ReferenceMap<Adaptor::Arc, bool, bool&, const bool&>,
+    BoolCombinedMap>();
+
+  Digraph::ArcMap<int> fw_map(digraph), bk_map(digraph);
+  for (Digraph::ArcIt a(digraph); a != INVALID; ++a) {
+    fw_map[a] = digraph.id(a);
+    bk_map[a] = -digraph.id(a);
+  }
+
+  Adaptor::CombinedArcMap<Digraph::ArcMap<int>, Digraph::ArcMap<int> >
+    comb_map(fw_map, bk_map);
+  for (Adaptor::ArcIt a(adaptor); a != INVALID; ++a) {
+    if (adaptor.source(a) == digraph.source(a)) {
+      check(comb_map[a] == fw_map[a], "Wrong combined map");
+    } else {
+      check(comb_map[a] == bk_map[a], "Wrong combined map");
+    }
+  }
+
+  // Check the conversion of nodes and arcs/edges
+  Digraph::Node nd = n3;
+  nd = n3;
+  Adaptor::Node na = n1;
+  na = n2;
+  Digraph::Arc ad = e3;
+  ad = e3;
+  Adaptor::Edge ea = a1;
+  ea = a2;
 }
 
 void checkResidual() {
-  checkConcept<concepts::Digraph,
-    Residual<concepts::Digraph,
-    concepts::Digraph::ArcMap<int>,
-    concepts::Digraph::ArcMap<int> > >();
-
+  // Check concepts
+  checkConcept<concepts::Digraph, Residual<concepts::Digraph> >();
+  checkConcept<concepts::Digraph, Residual<ListDigraph> >();
+
+  // Create a digraph and an adaptor
   typedef ListDigraph Digraph;
   typedef Digraph::ArcMap<int> IntArcMap;
@@ -404,5 +615,6 @@
   capacity[a6] = 10;
 
-  for (Adaptor::ArcIt a(adaptor); a != INVALID; ++a) {
+  // Check the adaptor with various flow values
+  for (Digraph::ArcIt a(digraph); a != INVALID; ++a) {
     flow[a] = 0;
   }
@@ -422,5 +634,5 @@
   checkGraphInArcList(adaptor, n4, 3);
 
-  for (Adaptor::ArcIt a(adaptor); a != INVALID; ++a) {
+  for (Digraph::ArcIt a(digraph); a != INVALID; ++a) {
     flow[a] = capacity[a] / 2;
   }
@@ -446,5 +658,5 @@
   checkGraphArcMap(adaptor);
 
-  for (Adaptor::ArcIt a(adaptor); a != INVALID; ++a) {
+  for (Digraph::ArcIt a(digraph); a != INVALID; ++a) {
     flow[a] = capacity[a];
   }
@@ -464,9 +676,28 @@
   checkGraphInArcList(adaptor, n4, 0);
 
+  // Saturate all backward arcs
+  // (set the flow to zero on all forward arcs)
   for (Adaptor::ArcIt a(adaptor); a != INVALID; ++a) {
-    flow[a] = 0;
-  }
-
+    if (adaptor.backward(a))
+      adaptor.augment(a, adaptor.residualCapacity(a));
+  }
+
+  checkGraphNodeList(adaptor, 4);
+  checkGraphArcList(adaptor, 6);
+  checkGraphConArcList(adaptor, 6);
+
+  checkGraphOutArcList(adaptor, n1, 3);
+  checkGraphOutArcList(adaptor, n2, 2);
+  checkGraphOutArcList(adaptor, n3, 1);
+  checkGraphOutArcList(adaptor, n4, 0);
+
+  checkGraphInArcList(adaptor, n1, 0);
+  checkGraphInArcList(adaptor, n2, 1);
+  checkGraphInArcList(adaptor, n3, 2);
+  checkGraphInArcList(adaptor, n4, 3);
+
+  // Find maximum flow by augmenting along shortest paths
   int flow_value = 0;
+  Adaptor::ResidualCapacity res_cap(adaptor);
   while (true) {
 
@@ -480,6 +711,5 @@
     int min = std::numeric_limits<int>::max();
     for (Path<Adaptor>::ArcIt a(p); a != INVALID; ++a) {
-      if (adaptor.residualCapacity(a) < min)
-        min = adaptor.residualCapacity(a);
+      if (res_cap[a] < min) min = res_cap[a];
     }
 
@@ -492,9 +722,28 @@
   check(flow_value == 18, "Wrong flow with res graph adaptor");
 
+  // Check forward() and backward()
+  for (Adaptor::ArcIt a(adaptor); a != INVALID; ++a) {
+    check(adaptor.forward(a) != adaptor.backward(a),
+          "Wrong forward() or backward()");
+    check((adaptor.forward(a) && adaptor.forward(Digraph::Arc(a)) == a) ||
+          (adaptor.backward(a) && adaptor.backward(Digraph::Arc(a)) == a),
+          "Wrong forward() or backward()");
+  }
+
+  // Check the conversion of nodes and arcs
+  Digraph::Node nd = Adaptor::NodeIt(adaptor);
+  nd = ++Adaptor::NodeIt(adaptor);
+  Adaptor::Node na = n1;
+  na = n2;
+  Digraph::Arc ad = Adaptor::ArcIt(adaptor);
+  ad = ++Adaptor::ArcIt(adaptor);
 }
 
 void checkSplitNodes() {
+  // Check concepts
   checkConcept<concepts::Digraph, SplitNodes<concepts::Digraph> >();
-
+  checkConcept<concepts::Digraph, SplitNodes<ListDigraph> >();
+
+  // Create a digraph and an adaptor
   typedef ListDigraph Digraph;
   typedef SplitNodes<Digraph> Adaptor;
@@ -535,4 +784,5 @@
   checkGraphArcMap(adaptor);
 
+  // Check split
   for (Adaptor::ArcIt a(adaptor); a != INVALID; ++a) {
     if (adaptor.origArc(a)) {
@@ -548,12 +798,80 @@
     }
   }
+
+  // Check combined node map
+  typedef Adaptor::CombinedNodeMap
+    <Digraph::NodeMap<int>, Digraph::NodeMap<int> > IntCombinedNodeMap;
+  typedef Adaptor::CombinedNodeMap
+    <Digraph::NodeMap<bool>, Digraph::NodeMap<bool> > BoolCombinedNodeMap;
+  checkConcept<concepts::ReferenceMap<Adaptor::Node, int, int&, const int&>,
+    IntCombinedNodeMap>();
+//checkConcept<concepts::ReferenceMap<Adaptor::Node, bool, bool&, const bool&>,
+//  BoolCombinedNodeMap>();
+  checkConcept<concepts::ReadWriteMap<Adaptor::Node, bool>,
+    BoolCombinedNodeMap>();
+
+  Digraph::NodeMap<int> in_map(digraph), out_map(digraph);
+  for (Digraph::NodeIt n(digraph); n != INVALID; ++n) {
+    in_map[n] = digraph.id(n);
+    out_map[n] = -digraph.id(n);
+  }
+
+  Adaptor::CombinedNodeMap<Digraph::NodeMap<int>, Digraph::NodeMap<int> >
+    node_map(in_map, out_map);
+  for (Adaptor::NodeIt n(adaptor); n != INVALID; ++n) {
+    if (adaptor.inNode(n)) {
+      check(node_map[n] == in_map[n], "Wrong combined node map");
+    } else {
+      check(node_map[n] == out_map[n], "Wrong combined node map");
+    }
+  }
+
+  // Check combined arc map
+  typedef Adaptor::CombinedArcMap
+    <Digraph::ArcMap<int>, Digraph::NodeMap<int> > IntCombinedArcMap;
+  typedef Adaptor::CombinedArcMap
+    <Digraph::ArcMap<bool>, Digraph::NodeMap<bool> > BoolCombinedArcMap;
+  checkConcept<concepts::ReferenceMap<Adaptor::Arc, int, int&, const int&>,
+    IntCombinedArcMap>();
+//checkConcept<concepts::ReferenceMap<Adaptor::Arc, bool, bool&, const bool&>,
+//  BoolCombinedArcMap>();
+  checkConcept<concepts::ReadWriteMap<Adaptor::Arc, bool>,
+    BoolCombinedArcMap>();
+
+  Digraph::ArcMap<int> a_map(digraph);
+  for (Digraph::ArcIt a(digraph); a != INVALID; ++a) {
+    a_map[a] = digraph.id(a);
+  }
+
+  Adaptor::CombinedArcMap<Digraph::ArcMap<int>, Digraph::NodeMap<int> >
+    arc_map(a_map, out_map);
+  for (Digraph::ArcIt a(digraph); a != INVALID; ++a) {
+    check(arc_map[adaptor.arc(a)] == a_map[a],  "Wrong combined arc map");
+  }
+  for (Digraph::NodeIt n(digraph); n != INVALID; ++n) {
+    check(arc_map[adaptor.arc(n)] == out_map[n],  "Wrong combined arc map");
+  }
+
+  // Check the conversion of nodes
+  Digraph::Node nd = adaptor.inNode(n1);
+  check (nd == n1, "Wrong node conversion");
+  nd = adaptor.outNode(n2);
+  check (nd == n2, "Wrong node conversion");
 }
 
 void checkSubGraph() {
-  checkConcept<concepts::Graph,
-    SubGraph<concepts::Graph,
-    concepts::Graph::NodeMap<bool>,
-    concepts::Graph::EdgeMap<bool> > >();
-
+  // Check concepts
+  checkConcept<concepts::Graph, SubGraph<concepts::Graph> >();
+  checkConcept<concepts::Graph, SubGraph<ListGraph> >();
+  checkConcept<concepts::AlterableGraphComponent<>,
+               SubGraph<ListGraph> >();
+  checkConcept<concepts::ExtendableGraphComponent<>,
+               SubGraph<ListGraph> >();
+  checkConcept<concepts::ErasableGraphComponent<>,
+               SubGraph<ListGraph> >();
+  checkConcept<concepts::ClearableGraphComponent<>,
+               SubGraph<ListGraph> >();
+
+  // Create a graph and an adaptor
   typedef ListGraph Graph;
   typedef Graph::NodeMap<bool> NodeFilter;
@@ -566,15 +884,17 @@
   Adaptor adaptor(graph, node_filter, edge_filter);
 
+  // Add nodes and edges to the original graph and the adaptor
   Graph::Node n1 = graph.addNode();
   Graph::Node n2 = graph.addNode();
-  Graph::Node n3 = graph.addNode();
-  Graph::Node n4 = graph.addNode();
+  Adaptor::Node n3 = adaptor.addNode();
+  Adaptor::Node n4 = adaptor.addNode();
+
+  node_filter[n1] = node_filter[n2] = node_filter[n3] = node_filter[n4] = true;
 
   Graph::Edge e1 = graph.addEdge(n1, n2);
   Graph::Edge e2 = graph.addEdge(n1, n3);
-  Graph::Edge e3 = graph.addEdge(n2, n3);
-  Graph::Edge e4 = graph.addEdge(n3, n4);
-
-  node_filter[n1] = node_filter[n2] = node_filter[n3] = node_filter[n4] = true;
+  Adaptor::Edge e3 = adaptor.addEdge(n2, n3);
+  Adaptor::Edge e4 = adaptor.addEdge(n3, n4);
+
   edge_filter[e1] = edge_filter[e2] = edge_filter[e3] = edge_filter[e4] = true;
 
@@ -585,18 +905,8 @@
   checkGraphConEdgeList(adaptor, 4);
 
-  checkGraphOutArcList(adaptor, n1, 2);
-  checkGraphOutArcList(adaptor, n2, 2);
-  checkGraphOutArcList(adaptor, n3, 3);
-  checkGraphOutArcList(adaptor, n4, 1);
-
-  checkGraphInArcList(adaptor, n1, 2);
-  checkGraphInArcList(adaptor, n2, 2);
-  checkGraphInArcList(adaptor, n3, 3);
-  checkGraphInArcList(adaptor, n4, 1);
-
-  checkGraphIncEdgeList(adaptor, n1, 2);
-  checkGraphIncEdgeList(adaptor, n2, 2);
-  checkGraphIncEdgeList(adaptor, n3, 3);
-  checkGraphIncEdgeList(adaptor, n4, 1);
+  checkGraphIncEdgeArcLists(adaptor, n1, 2);
+  checkGraphIncEdgeArcLists(adaptor, n2, 2);
+  checkGraphIncEdgeArcLists(adaptor, n3, 3);
+  checkGraphIncEdgeArcLists(adaptor, n4, 1);
 
   checkNodeIds(adaptor);
@@ -608,5 +918,8 @@
   checkGraphEdgeMap(adaptor);
 
-  edge_filter[e2] = false;
+  // Hide an edge
+  adaptor.status(e2, false);
+  adaptor.disable(e3);
+  if (!adaptor.status(e3)) adaptor.enable(e3);
 
   checkGraphNodeList(adaptor, 4);
@@ -616,18 +929,8 @@
   checkGraphConEdgeList(adaptor, 3);
 
-  checkGraphOutArcList(adaptor, n1, 1);
-  checkGraphOutArcList(adaptor, n2, 2);
-  checkGraphOutArcList(adaptor, n3, 2);
-  checkGraphOutArcList(adaptor, n4, 1);
-
-  checkGraphInArcList(adaptor, n1, 1);
-  checkGraphInArcList(adaptor, n2, 2);
-  checkGraphInArcList(adaptor, n3, 2);
-  checkGraphInArcList(adaptor, n4, 1);
-
-  checkGraphIncEdgeList(adaptor, n1, 1);
-  checkGraphIncEdgeList(adaptor, n2, 2);
-  checkGraphIncEdgeList(adaptor, n3, 2);
-  checkGraphIncEdgeList(adaptor, n4, 1);
+  checkGraphIncEdgeArcLists(adaptor, n1, 1);
+  checkGraphIncEdgeArcLists(adaptor, n2, 2);
+  checkGraphIncEdgeArcLists(adaptor, n3, 2);
+  checkGraphIncEdgeArcLists(adaptor, n4, 1);
 
   checkNodeIds(adaptor);
@@ -639,5 +942,8 @@
   checkGraphEdgeMap(adaptor);
 
-  node_filter[n1] = false;
+  // Hide a node
+  adaptor.status(n1, false);
+  adaptor.disable(n3);
+  if (!adaptor.status(n3)) adaptor.enable(n3);
 
   checkGraphNodeList(adaptor, 3);
@@ -647,15 +953,7 @@
   checkGraphConEdgeList(adaptor, 2);
 
-  checkGraphOutArcList(adaptor, n2, 1);
-  checkGraphOutArcList(adaptor, n3, 2);
-  checkGraphOutArcList(adaptor, n4, 1);
-
-  checkGraphInArcList(adaptor, n2, 1);
-  checkGraphInArcList(adaptor, n3, 2);
-  checkGraphInArcList(adaptor, n4, 1);
-
-  checkGraphIncEdgeList(adaptor, n2, 1);
-  checkGraphIncEdgeList(adaptor, n3, 2);
-  checkGraphIncEdgeList(adaptor, n4, 1);
+  checkGraphIncEdgeArcLists(adaptor, n2, 1);
+  checkGraphIncEdgeArcLists(adaptor, n3, 2);
+  checkGraphIncEdgeArcLists(adaptor, n4, 1);
 
   checkNodeIds(adaptor);
@@ -667,4 +965,5 @@
   checkGraphEdgeMap(adaptor);
 
+  // Hide all nodes and edges
   node_filter[n1] = node_filter[n2] = node_filter[n3] = node_filter[n4] = false;
   edge_filter[e1] = edge_filter[e2] = edge_filter[e3] = edge_filter[e4] = false;
@@ -683,15 +982,35 @@
   checkGraphArcMap(adaptor);
   checkGraphEdgeMap(adaptor);
+
+  // Check the conversion of nodes and edges
+  Graph::Node ng = n3;
+  ng = n4;
+  Adaptor::Node na = n1;
+  na = n2;
+  Graph::Edge eg = e3;
+  eg = e4;
+  Adaptor::Edge ea = e1;
+  ea = e2;
 }
 
 void checkFilterNodes2() {
-  checkConcept<concepts::Graph,
-    FilterNodes<concepts::Graph,
-      concepts::Graph::NodeMap<bool> > >();
-
+  // Check concepts
+  checkConcept<concepts::Graph, FilterNodes<concepts::Graph> >();
+  checkConcept<concepts::Graph, FilterNodes<ListGraph> >();
+  checkConcept<concepts::AlterableGraphComponent<>,
+               FilterNodes<ListGraph> >();
+  checkConcept<concepts::ExtendableGraphComponent<>,
+               FilterNodes<ListGraph> >();
+  checkConcept<concepts::ErasableGraphComponent<>,
+               FilterNodes<ListGraph> >();
+  checkConcept<concepts::ClearableGraphComponent<>,
+               FilterNodes<ListGraph> >();
+
+  // Create a graph and an adaptor
   typedef ListGraph Graph;
   typedef Graph::NodeMap<bool> NodeFilter;
   typedef FilterNodes<Graph, NodeFilter> Adaptor;
 
+  // Add nodes and edges to the original graph and the adaptor
   Graph graph;
   NodeFilter node_filter(graph);
@@ -700,13 +1019,13 @@
   Graph::Node n1 = graph.addNode();
   Graph::Node n2 = graph.addNode();
-  Graph::Node n3 = graph.addNode();
-  Graph::Node n4 = graph.addNode();
+  Adaptor::Node n3 = adaptor.addNode();
+  Adaptor::Node n4 = adaptor.addNode();
+
+  node_filter[n1] = node_filter[n2] = node_filter[n3] = node_filter[n4] = true;
 
   Graph::Edge e1 = graph.addEdge(n1, n2);
   Graph::Edge e2 = graph.addEdge(n1, n3);
-  Graph::Edge e3 = graph.addEdge(n2, n3);
-  Graph::Edge e4 = graph.addEdge(n3, n4);
-
-  node_filter[n1] = node_filter[n2] = node_filter[n3] = node_filter[n4] = true;
+  Adaptor::Edge e3 = adaptor.addEdge(n2, n3);
+  Adaptor::Edge e4 = adaptor.addEdge(n3, n4);
 
   checkGraphNodeList(adaptor, 4);
@@ -716,18 +1035,8 @@
   checkGraphConEdgeList(adaptor, 4);
 
-  checkGraphOutArcList(adaptor, n1, 2);
-  checkGraphOutArcList(adaptor, n2, 2);
-  checkGraphOutArcList(adaptor, n3, 3);
-  checkGraphOutArcList(adaptor, n4, 1);
-
-  checkGraphInArcList(adaptor, n1, 2);
-  checkGraphInArcList(adaptor, n2, 2);
-  checkGraphInArcList(adaptor, n3, 3);
-  checkGraphInArcList(adaptor, n4, 1);
-
-  checkGraphIncEdgeList(adaptor, n1, 2);
-  checkGraphIncEdgeList(adaptor, n2, 2);
-  checkGraphIncEdgeList(adaptor, n3, 3);
-  checkGraphIncEdgeList(adaptor, n4, 1);
+  checkGraphIncEdgeArcLists(adaptor, n1, 2);
+  checkGraphIncEdgeArcLists(adaptor, n2, 2);
+  checkGraphIncEdgeArcLists(adaptor, n3, 3);
+  checkGraphIncEdgeArcLists(adaptor, n4, 1);
 
   checkNodeIds(adaptor);
@@ -739,5 +1048,8 @@
   checkGraphEdgeMap(adaptor);
 
-  node_filter[n1] = false;
+  // Hide a node
+  adaptor.status(n1, false);
+  adaptor.disable(n3);
+  if (!adaptor.status(n3)) adaptor.enable(n3);
 
   checkGraphNodeList(adaptor, 3);
@@ -747,15 +1059,7 @@
   checkGraphConEdgeList(adaptor, 2);
 
-  checkGraphOutArcList(adaptor, n2, 1);
-  checkGraphOutArcList(adaptor, n3, 2);
-  checkGraphOutArcList(adaptor, n4, 1);
-
-  checkGraphInArcList(adaptor, n2, 1);
-  checkGraphInArcList(adaptor, n3, 2);
-  checkGraphInArcList(adaptor, n4, 1);
-
-  checkGraphIncEdgeList(adaptor, n2, 1);
-  checkGraphIncEdgeList(adaptor, n3, 2);
-  checkGraphIncEdgeList(adaptor, n4, 1);
+  checkGraphIncEdgeArcLists(adaptor, n2, 1);
+  checkGraphIncEdgeArcLists(adaptor, n3, 2);
+  checkGraphIncEdgeArcLists(adaptor, n4, 1);
 
   checkNodeIds(adaptor);
@@ -767,4 +1071,5 @@
   checkGraphEdgeMap(adaptor);
 
+  // Hide all nodes
   node_filter[n1] = node_filter[n2] = node_filter[n3] = node_filter[n4] = false;
 
@@ -782,11 +1087,30 @@
   checkGraphArcMap(adaptor);
   checkGraphEdgeMap(adaptor);
+
+  // Check the conversion of nodes and edges
+  Graph::Node ng = n3;
+  ng = n4;
+  Adaptor::Node na = n1;
+  na = n2;
+  Graph::Edge eg = e3;
+  eg = e4;
+  Adaptor::Edge ea = e1;
+  ea = e2;
 }
 
 void checkFilterEdges() {
-  checkConcept<concepts::Graph,
-    FilterEdges<concepts::Graph,
-    concepts::Graph::EdgeMap<bool> > >();
-
+  // Check concepts
+  checkConcept<concepts::Graph, FilterEdges<concepts::Graph> >();
+  checkConcept<concepts::Graph, FilterEdges<ListGraph> >();
+  checkConcept<concepts::AlterableGraphComponent<>,
+               FilterEdges<ListGraph> >();
+  checkConcept<concepts::ExtendableGraphComponent<>,
+               FilterEdges<ListGraph> >();
+  checkConcept<concepts::ErasableGraphComponent<>,
+               FilterEdges<ListGraph> >();
+  checkConcept<concepts::ClearableGraphComponent<>,
+               FilterEdges<ListGraph> >();
+
+  // Create a graph and an adaptor
   typedef ListGraph Graph;
   typedef Graph::EdgeMap<bool> EdgeFilter;
@@ -797,13 +1121,14 @@
   Adaptor adaptor(graph, edge_filter);
 
+  // Add nodes and edges to the original graph and the adaptor
   Graph::Node n1 = graph.addNode();
   Graph::Node n2 = graph.addNode();
-  Graph::Node n3 = graph.addNode();
-  Graph::Node n4 = graph.addNode();
+  Adaptor::Node n3 = adaptor.addNode();
+  Adaptor::Node n4 = adaptor.addNode();
 
   Graph::Edge e1 = graph.addEdge(n1, n2);
   Graph::Edge e2 = graph.addEdge(n1, n3);
-  Graph::Edge e3 = graph.addEdge(n2, n3);
-  Graph::Edge e4 = graph.addEdge(n3, n4);
+  Adaptor::Edge e3 = adaptor.addEdge(n2, n3);
+  Adaptor::Edge e4 = adaptor.addEdge(n3, n4);
 
   edge_filter[e1] = edge_filter[e2] = edge_filter[e3] = edge_filter[e4] = true;
@@ -815,18 +1140,8 @@
   checkGraphConEdgeList(adaptor, 4);
 
-  checkGraphOutArcList(adaptor, n1, 2);
-  checkGraphOutArcList(adaptor, n2, 2);
-  checkGraphOutArcList(adaptor, n3, 3);
-  checkGraphOutArcList(adaptor, n4, 1);
-
-  checkGraphInArcList(adaptor, n1, 2);
-  checkGraphInArcList(adaptor, n2, 2);
-  checkGraphInArcList(adaptor, n3, 3);
-  checkGraphInArcList(adaptor, n4, 1);
-
-  checkGraphIncEdgeList(adaptor, n1, 2);
-  checkGraphIncEdgeList(adaptor, n2, 2);
-  checkGraphIncEdgeList(adaptor, n3, 3);
-  checkGraphIncEdgeList(adaptor, n4, 1);
+  checkGraphIncEdgeArcLists(adaptor, n1, 2);
+  checkGraphIncEdgeArcLists(adaptor, n2, 2);
+  checkGraphIncEdgeArcLists(adaptor, n3, 3);
+  checkGraphIncEdgeArcLists(adaptor, n4, 1);
 
   checkNodeIds(adaptor);
@@ -838,5 +1153,8 @@
   checkGraphEdgeMap(adaptor);
 
-  edge_filter[e2] = false;
+  // Hide an edge
+  adaptor.status(e2, false);
+  adaptor.disable(e3);
+  if (!adaptor.status(e3)) adaptor.enable(e3);
 
   checkGraphNodeList(adaptor, 4);
@@ -846,18 +1164,8 @@
   checkGraphConEdgeList(adaptor, 3);
 
-  checkGraphOutArcList(adaptor, n1, 1);
-  checkGraphOutArcList(adaptor, n2, 2);
-  checkGraphOutArcList(adaptor, n3, 2);
-  checkGraphOutArcList(adaptor, n4, 1);
-
-  checkGraphInArcList(adaptor, n1, 1);
-  checkGraphInArcList(adaptor, n2, 2);
-  checkGraphInArcList(adaptor, n3, 2);
-  checkGraphInArcList(adaptor, n4, 1);
-
-  checkGraphIncEdgeList(adaptor, n1, 1);
-  checkGraphIncEdgeList(adaptor, n2, 2);
-  checkGraphIncEdgeList(adaptor, n3, 2);
-  checkGraphIncEdgeList(adaptor, n4, 1);
+  checkGraphIncEdgeArcLists(adaptor, n1, 1);
+  checkGraphIncEdgeArcLists(adaptor, n2, 2);
+  checkGraphIncEdgeArcLists(adaptor, n3, 2);
+  checkGraphIncEdgeArcLists(adaptor, n4, 1);
 
   checkNodeIds(adaptor);
@@ -869,4 +1177,5 @@
   checkGraphEdgeMap(adaptor);
 
+  // Hide all edges
   edge_filter[e1] = edge_filter[e2] = edge_filter[e3] = edge_filter[e4] = false;
 
@@ -884,10 +1193,30 @@
   checkGraphArcMap(adaptor);
   checkGraphEdgeMap(adaptor);
+
+  // Check the conversion of nodes and edges
+  Graph::Node ng = n3;
+  ng = n4;
+  Adaptor::Node na = n1;
+  na = n2;
+  Graph::Edge eg = e3;
+  eg = e4;
+  Adaptor::Edge ea = e1;
+  ea = e2;
 }
 
 void checkOrienter() {
-  checkConcept<concepts::Digraph,
-    Orienter<concepts::Graph, concepts::Graph::EdgeMap<bool> > >();
-
+  // Check concepts
+  checkConcept<concepts::Digraph, Orienter<concepts::Graph> >();
+  checkConcept<concepts::Digraph, Orienter<ListGraph> >();
+  checkConcept<concepts::AlterableDigraphComponent<>,
+               Orienter<ListGraph> >();
+  checkConcept<concepts::ExtendableDigraphComponent<>,
+               Orienter<ListGraph> >();
+  checkConcept<concepts::ErasableDigraphComponent<>,
+               Orienter<ListGraph> >();
+  checkConcept<concepts::ClearableDigraphComponent<>,
+               Orienter<ListGraph> >();
+
+  // Create a graph and an adaptor
   typedef ListGraph Graph;
   typedef ListGraph::EdgeMap<bool> DirMap;
@@ -895,19 +1224,57 @@
 
   Graph graph;
-  DirMap dir(graph, true);
+  DirMap dir(graph);
   Adaptor adaptor(graph, dir);
 
+  // Add nodes and edges to the original graph and the adaptor
   Graph::Node n1 = graph.addNode();
   Graph::Node n2 = graph.addNode();
-  Graph::Node n3 = graph.addNode();
+  Adaptor::Node n3 = adaptor.addNode();
 
   Graph::Edge e1 = graph.addEdge(n1, n2);
   Graph::Edge e2 = graph.addEdge(n1, n3);
-  Graph::Edge e3 = graph.addEdge(n2, n3);
-
+  Adaptor::Arc e3 = adaptor.addArc(n2, n3);
+
+  dir[e1] = dir[e2] = dir[e3] = true;
+
+  // Check the original graph
+  checkGraphNodeList(graph, 3);
+  checkGraphArcList(graph, 6);
+  checkGraphConArcList(graph, 6);
+  checkGraphEdgeList(graph, 3);
+  checkGraphConEdgeList(graph, 3);
+
+  checkGraphIncEdgeArcLists(graph, n1, 2);
+  checkGraphIncEdgeArcLists(graph, n2, 2);
+  checkGraphIncEdgeArcLists(graph, n3, 2);
+
+  checkNodeIds(graph);
+  checkArcIds(graph);
+  checkEdgeIds(graph);
+
+  checkGraphNodeMap(graph);
+  checkGraphArcMap(graph);
+  checkGraphEdgeMap(graph);
+
+  // Check the adaptor
   checkGraphNodeList(adaptor, 3);
   checkGraphArcList(adaptor, 3);
   checkGraphConArcList(adaptor, 3);
 
+  checkGraphOutArcList(adaptor, n1, 2);
+  checkGraphOutArcList(adaptor, n2, 1);
+  checkGraphOutArcList(adaptor, n3, 0);
+
+  checkGraphInArcList(adaptor, n1, 0);
+  checkGraphInArcList(adaptor, n2, 1);
+  checkGraphInArcList(adaptor, n3, 2);
+
+  checkNodeIds(adaptor);
+  checkArcIds(adaptor);
+
+  checkGraphNodeMap(adaptor);
+  checkGraphArcMap(adaptor);
+
+  // Check direction changing
   {
     dir[e1] = true;
@@ -949,4 +1316,9 @@
   }
 
+  // Check the adaptor again
+  checkGraphNodeList(adaptor, 3);
+  checkGraphArcList(adaptor, 3);
+  checkGraphConArcList(adaptor, 3);
+
   checkGraphOutArcList(adaptor, n1, 1);
   checkGraphOutArcList(adaptor, n2, 1);
@@ -963,9 +1335,135 @@
   checkGraphArcMap(adaptor);
 
+  // Check reverseArc()
+  adaptor.reverseArc(e2);
+  adaptor.reverseArc(e3);
+  adaptor.reverseArc(e2);
+
+  checkGraphNodeList(adaptor, 3);
+  checkGraphArcList(adaptor, 3);
+  checkGraphConArcList(adaptor, 3);
+
+  checkGraphOutArcList(adaptor, n1, 1);
+  checkGraphOutArcList(adaptor, n2, 0);
+  checkGraphOutArcList(adaptor, n3, 2);
+
+  checkGraphInArcList(adaptor, n1, 1);
+  checkGraphInArcList(adaptor, n2, 2);
+  checkGraphInArcList(adaptor, n3, 0);
+
+  // Check the conversion of nodes and arcs/edges
+  Graph::Node ng = n3;
+  ng = n3;
+  Adaptor::Node na = n1;
+  na = n2;
+  Graph::Edge eg = e3;
+  eg = e3;
+  Adaptor::Arc aa = e1;
+  aa = e2;
 }
 
+void checkCombiningAdaptors() {
+  // Create a grid graph
+  GridGraph graph(2,2);
+  GridGraph::Node n1 = graph(0,0);
+  GridGraph::Node n2 = graph(0,1);
+  GridGraph::Node n3 = graph(1,0);
+  GridGraph::Node n4 = graph(1,1);
+
+  GridGraph::EdgeMap<bool> dir_map(graph);
+  dir_map[graph.right(n1)] = graph.u(graph.right(n1)) == n1;
+  dir_map[graph.up(n1)] = graph.u(graph.up(n1)) != n1;
+  dir_map[graph.left(n4)] = graph.u(graph.left(n4)) != n4;
+  dir_map[graph.down(n4)] = graph.u(graph.down(n4)) != n4;
+
+  // Apply several adaptors on the grid graph
+  typedef SplitNodes< ReverseDigraph< const Orienter<
+            const GridGraph, GridGraph::EdgeMap<bool> > > >
+    RevSplitGridGraph;
+  typedef ReverseDigraph<const RevSplitGridGraph> SplitGridGraph;
+  typedef Undirector<const SplitGridGraph> USplitGridGraph;
+  typedef Undirector<const USplitGridGraph> UUSplitGridGraph;
+  checkConcept<concepts::Digraph, RevSplitGridGraph>();
+  checkConcept<concepts::Digraph, SplitGridGraph>();
+  checkConcept<concepts::Graph, USplitGridGraph>();
+  checkConcept<concepts::Graph, UUSplitGridGraph>();
+
+  RevSplitGridGraph rev_adaptor =
+    splitNodes(reverseDigraph(orienter(graph, dir_map)));
+  SplitGridGraph adaptor = reverseDigraph(rev_adaptor);
+  USplitGridGraph uadaptor = undirector(adaptor);
+  UUSplitGridGraph uuadaptor = undirector(uadaptor);
+
+  // Check adaptor
+  checkGraphNodeList(adaptor, 8);
+  checkGraphArcList(adaptor, 8);
+  checkGraphConArcList(adaptor, 8);
+
+  checkGraphOutArcList(adaptor, rev_adaptor.inNode(n1), 1);
+  checkGraphOutArcList(adaptor, rev_adaptor.outNode(n1), 1);
+  checkGraphOutArcList(adaptor, rev_adaptor.inNode(n2), 2);
+  checkGraphOutArcList(adaptor, rev_adaptor.outNode(n2), 1);
+  checkGraphOutArcList(adaptor, rev_adaptor.inNode(n3), 1);
+  checkGraphOutArcList(adaptor, rev_adaptor.outNode(n3), 1);
+  checkGraphOutArcList(adaptor, rev_adaptor.inNode(n4), 0);
+  checkGraphOutArcList(adaptor, rev_adaptor.outNode(n4), 1);
+
+  checkGraphInArcList(adaptor, rev_adaptor.inNode(n1), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.outNode(n1), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.inNode(n2), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.outNode(n2), 0);
+  checkGraphInArcList(adaptor, rev_adaptor.inNode(n3), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.outNode(n3), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.inNode(n4), 1);
+  checkGraphInArcList(adaptor, rev_adaptor.outNode(n4), 2);
+
+  checkNodeIds(adaptor);
+  checkArcIds(adaptor);
+
+  checkGraphNodeMap(adaptor);
+  checkGraphArcMap(adaptor);
+
+  // Check uadaptor
+  checkGraphNodeList(uadaptor, 8);
+  checkGraphEdgeList(uadaptor, 8);
+  checkGraphArcList(uadaptor, 16);
+  checkGraphConEdgeList(uadaptor, 8);
+  checkGraphConArcList(uadaptor, 16);
+
+  checkNodeIds(uadaptor);
+  checkEdgeIds(uadaptor);
+  checkArcIds(uadaptor);
+
+  checkGraphNodeMap(uadaptor);
+  checkGraphEdgeMap(uadaptor);
+  checkGraphArcMap(uadaptor);
+
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.inNode(n1), 2);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.outNode(n1), 2);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.inNode(n2), 3);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.outNode(n2), 1);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.inNode(n3), 2);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.outNode(n3), 2);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.inNode(n4), 1);
+  checkGraphIncEdgeArcLists(uadaptor, rev_adaptor.outNode(n4), 3);
+
+  // Check uuadaptor
+  checkGraphNodeList(uuadaptor, 8);
+  checkGraphEdgeList(uuadaptor, 16);
+  checkGraphArcList(uuadaptor, 32);
+  checkGraphConEdgeList(uuadaptor, 16);
+  checkGraphConArcList(uuadaptor, 32);
+
+  checkNodeIds(uuadaptor);
+  checkEdgeIds(uuadaptor);
+  checkArcIds(uuadaptor);
+
+  checkGraphNodeMap(uuadaptor);
+  checkGraphEdgeMap(uuadaptor);
+  checkGraphArcMap(uuadaptor);
+}
 
 int main(int, const char **) {
-
+  // Check the digraph adaptors (using ListDigraph)
   checkReverseDigraph();
   checkSubDigraph();
@@ -976,4 +1474,5 @@
   checkSplitNodes();
 
+  // Check the graph adaptors (using ListGraph)
   checkSubGraph();
   checkFilterNodes2();
@@ -981,4 +1480,7 @@
   checkOrienter();
 
+  // Combine adaptors (using GridGraph)
+  checkCombiningAdaptors();
+
   return 0;
 }
Index: test/lp_test.cc
===================================================================
--- test/lp_test.cc	(revision 485)
+++ 	(revision )
@@ -1,403 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * 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 <sstream>
-#include <lemon/lp_skeleton.h>
-#include "test_tools.h"
-#include <lemon/tolerance.h>
-
-#ifdef HAVE_CONFIG_H
-#include <lemon/config.h>
-#endif
-
-#ifdef HAVE_GLPK
-#include <lemon/glpk.h>
-#endif
-
-#ifdef HAVE_CPLEX
-#include <lemon/cplex.h>
-#endif
-
-#ifdef HAVE_SOPLEX
-#include <lemon/soplex.h>
-#endif
-
-#ifdef HAVE_CLP
-#include <lemon/clp.h>
-#endif
-
-using namespace lemon;
-
-void lpTest(LpSolver& lp)
-{
-
-  typedef LpSolver LP;
-
-  std::vector<LP::Col> x(10);
-  //  for(int i=0;i<10;i++) x.push_back(lp.addCol());
-  lp.addColSet(x);
-  lp.colLowerBound(x,1);
-  lp.colUpperBound(x,1);
-  lp.colBounds(x,1,2);
-
-  std::vector<LP::Col> y(10);
-  lp.addColSet(y);
-
-  lp.colLowerBound(y,1);
-  lp.colUpperBound(y,1);
-  lp.colBounds(y,1,2);
-
-  std::map<int,LP::Col> z;
-
-  z.insert(std::make_pair(12,INVALID));
-  z.insert(std::make_pair(2,INVALID));
-  z.insert(std::make_pair(7,INVALID));
-  z.insert(std::make_pair(5,INVALID));
-
-  lp.addColSet(z);
-
-  lp.colLowerBound(z,1);
-  lp.colUpperBound(z,1);
-  lp.colBounds(z,1,2);
-
-  {
-    LP::Expr e,f,g;
-    LP::Col p1,p2,p3,p4,p5;
-    LP::Constr c;
-
-    p1=lp.addCol();
-    p2=lp.addCol();
-    p3=lp.addCol();
-    p4=lp.addCol();
-    p5=lp.addCol();
-
-    e[p1]=2;
-    *e=12;
-    e[p1]+=2;
-    *e+=12;
-    e[p1]-=2;
-    *e-=12;
-
-    e=2;
-    e=2.2;
-    e=p1;
-    e=f;
-
-    e+=2;
-    e+=2.2;
-    e+=p1;
-    e+=f;
-
-    e-=2;
-    e-=2.2;
-    e-=p1;
-    e-=f;
-
-    e*=2;
-    e*=2.2;
-    e/=2;
-    e/=2.2;
-
-    e=((p1+p2)+(p1-p2)+(p1+12)+(12+p1)+(p1-12)+(12-p1)+
-       (f+12)+(12+f)+(p1+f)+(f+p1)+(f+g)+
-       (f-12)+(12-f)+(p1-f)+(f-p1)+(f-g)+
-       2.2*f+f*2.2+f/2.2+
-       2*f+f*2+f/2+
-       2.2*p1+p1*2.2+p1/2.2+
-       2*p1+p1*2+p1/2
-       );
-
-
-    c = (e  <= f  );
-    c = (e  <= 2.2);
-    c = (e  <= 2  );
-    c = (e  <= p1 );
-    c = (2.2<= f  );
-    c = (2  <= f  );
-    c = (p1 <= f  );
-    c = (p1 <= p2 );
-    c = (p1 <= 2.2);
-    c = (p1 <= 2  );
-    c = (2.2<= p2 );
-    c = (2  <= p2 );
-
-    c = (e  >= f  );
-    c = (e  >= 2.2);
-    c = (e  >= 2  );
-    c = (e  >= p1 );
-    c = (2.2>= f  );
-    c = (2  >= f  );
-    c = (p1 >= f  );
-    c = (p1 >= p2 );
-    c = (p1 >= 2.2);
-    c = (p1 >= 2  );
-    c = (2.2>= p2 );
-    c = (2  >= p2 );
-
-    c = (e  == f  );
-    c = (e  == 2.2);
-    c = (e  == 2  );
-    c = (e  == p1 );
-    c = (2.2== f  );
-    c = (2  == f  );
-    c = (p1 == f  );
-    //c = (p1 == p2 );
-    c = (p1 == 2.2);
-    c = (p1 == 2  );
-    c = (2.2== p2 );
-    c = (2  == p2 );
-
-    c = ((2 <= e) <= 3);
-    c = ((2 <= p1) <= 3);
-
-    c = ((2 >= e) >= 3);
-    c = ((2 >= p1) >= 3);
-
-    e[x[3]]=2;
-    e[x[3]]=4;
-    e[x[3]]=1;
-    *e=12;
-
-    lp.addRow(-LP::INF,e,23);
-    lp.addRow(-LP::INF,3.0*(x[1]+x[2]/2)-x[3],23);
-    lp.addRow(-LP::INF,3.0*(x[1]+x[2]*2-5*x[3]+12-x[4]/3)+2*x[4]-4,23);
-
-    lp.addRow(x[1]+x[3]<=x[5]-3);
-    lp.addRow((-7<=x[1]+x[3]-12)<=3);
-    lp.addRow(x[1]<=x[5]);
-
-    std::ostringstream buf;
-
-
-    e=((p1+p2)+(p1-0.99*p2));
-    //e.prettyPrint(std::cout);
-    //(e<=2).prettyPrint(std::cout);
-    double tolerance=0.001;
-    e.simplify(tolerance);
-    buf << "Coeff. of p2 should be 0.01";
-    check(e[p2]>0, buf.str());
-
-    tolerance=0.02;
-    e.simplify(tolerance);
-    buf << "Coeff. of p2 should be 0";
-    check(const_cast<const LpSolver::Expr&>(e)[p2]==0, buf.str());
-
-
-  }
-
-  {
-    LP::DualExpr e,f,g;
-    LP::Row p1 = INVALID, p2 = INVALID, p3 = INVALID,
-      p4 = INVALID, p5 = INVALID;
-
-    e[p1]=2;
-    e[p1]+=2;
-    e[p1]-=2;
-
-    e=p1;
-    e=f;
-
-    e+=p1;
-    e+=f;
-
-    e-=p1;
-    e-=f;
-
-    e*=2;
-    e*=2.2;
-    e/=2;
-    e/=2.2;
-
-    e=((p1+p2)+(p1-p2)+
-       (p1+f)+(f+p1)+(f+g)+
-       (p1-f)+(f-p1)+(f-g)+
-       2.2*f+f*2.2+f/2.2+
-       2*f+f*2+f/2+
-       2.2*p1+p1*2.2+p1/2.2+
-       2*p1+p1*2+p1/2
-       );
-  }
-
-}
-
-void solveAndCheck(LpSolver& lp, LpSolver::ProblemType stat,
-                   double exp_opt) {
-  using std::string;
-  lp.solve();
-
-  std::ostringstream buf;
-  buf << "PrimalType should be: " << int(stat) << int(lp.primalType());
-
-  check(lp.primalType()==stat, buf.str());
-
-  if (stat ==  LpSolver::OPTIMAL) {
-    std::ostringstream sbuf;
-    sbuf << "Wrong optimal value: the right optimum is " << exp_opt;
-    check(std::abs(lp.primal()-exp_opt) < 1e-3, sbuf.str());
-  }
-}
-
-void aTest(LpSolver & lp)
-{
-  typedef LpSolver LP;
-
- //The following example is very simple
-
-  typedef LpSolver::Row Row;
-  typedef LpSolver::Col Col;
-
-
-  Col x1 = lp.addCol();
-  Col x2 = lp.addCol();
-
-
-  //Constraints
-  Row upright=lp.addRow(x1+2*x2 <=1);
-  lp.addRow(x1+x2 >=-1);
-  lp.addRow(x1-x2 <=1);
-  lp.addRow(x1-x2 >=-1);
-  //Nonnegativity of the variables
-  lp.colLowerBound(x1, 0);
-  lp.colLowerBound(x2, 0);
-  //Objective function
-  lp.obj(x1+x2);
-
-  lp.sense(lp.MAX);
-
-  //Testing the problem retrieving routines
-  check(lp.objCoeff(x1)==1,"First term should be 1 in the obj function!");
-  check(lp.sense() == lp.MAX,"This is a maximization!");
-  check(lp.coeff(upright,x1)==1,"The coefficient in question is 1!");
-  check(lp.colLowerBound(x1)==0,
-        "The lower bound for variable x1 should be 0.");
-  check(lp.colUpperBound(x1)==LpSolver::INF,
-        "The upper bound for variable x1 should be infty.");
-  check(lp.rowLowerBound(upright) == -LpSolver::INF,
-        "The lower bound for the first row should be -infty.");
-  check(lp.rowUpperBound(upright)==1,
-        "The upper bound for the first row should be 1.");
-  LpSolver::Expr e = lp.row(upright);
-  check(e[x1] == 1, "The first coefficient should 1.");
-  check(e[x2] == 2, "The second coefficient should 1.");
-
-  lp.row(upright, x1+x2 <=1);
-  e = lp.row(upright);
-  check(e[x1] == 1, "The first coefficient should 1.");
-  check(e[x2] == 1, "The second coefficient should 1.");
-
-  LpSolver::DualExpr de = lp.col(x1);
-  check(  de[upright] == 1, "The first coefficient should 1.");
-
-  LpSolver* clp = lp.cloneSolver();
-
-  //Testing the problem retrieving routines
-  check(clp->objCoeff(x1)==1,"First term should be 1 in the obj function!");
-  check(clp->sense() == clp->MAX,"This is a maximization!");
-  check(clp->coeff(upright,x1)==1,"The coefficient in question is 1!");
-  //  std::cout<<lp.colLowerBound(x1)<<std::endl;
-  check(clp->colLowerBound(x1)==0,
-        "The lower bound for variable x1 should be 0.");
-  check(clp->colUpperBound(x1)==LpSolver::INF,
-        "The upper bound for variable x1 should be infty.");
-
-  check(lp.rowLowerBound(upright)==-LpSolver::INF,
-        "The lower bound for the first row should be -infty.");
-  check(lp.rowUpperBound(upright)==1,
-        "The upper bound for the first row should be 1.");
-  e = clp->row(upright);
-  check(e[x1] == 1, "The first coefficient should 1.");
-  check(e[x2] == 1, "The second coefficient should 1.");
-
-  de = clp->col(x1);
-  check(de[upright] == 1, "The first coefficient should 1.");
-
-  delete clp;
-
-  //Maximization of x1+x2
-  //over the triangle with vertices (0,0) (0,1) (1,0)
-  double expected_opt=1;
-  solveAndCheck(lp, LpSolver::OPTIMAL, expected_opt);
-
-  //Minimization
-  lp.sense(lp.MIN);
-  expected_opt=0;
-  solveAndCheck(lp, LpSolver::OPTIMAL, expected_opt);
-
-  //Vertex (-1,0) instead of (0,0)
-  lp.colLowerBound(x1, -LpSolver::INF);
-  expected_opt=-1;
-  solveAndCheck(lp, LpSolver::OPTIMAL, expected_opt);
-
-  //Erase one constraint and return to maximization
-  lp.erase(upright);
-  lp.sense(lp.MAX);
-  expected_opt=LpSolver::INF;
-  solveAndCheck(lp, LpSolver::UNBOUNDED, expected_opt);
-
-  //Infeasibilty
-  lp.addRow(x1+x2 <=-2);
-  solveAndCheck(lp, LpSolver::INFEASIBLE, expected_opt);
-
-}
-
-int main()
-{
-  LpSkeleton lp_skel;
-  lpTest(lp_skel);
-
-#ifdef HAVE_GLPK
-  {
-    GlpkLp lp_glpk1,lp_glpk2;
-    lpTest(lp_glpk1);
-    aTest(lp_glpk2);
-  }
-#endif
-
-#ifdef HAVE_CPLEX
-  try {
-    CplexLp lp_cplex1,lp_cplex2;
-    lpTest(lp_cplex1);
-    aTest(lp_cplex2);
-  } catch (CplexEnv::LicenseError& error) {
-#ifdef LEMON_FORCE_CPLEX_CHECK
-    check(false, error.what());
-#else
-    std::cerr << error.what() << std::endl;
-    std::cerr << "Cplex license check failed, lp check skipped" << std::endl;
-#endif
-  }
-#endif
-
-#ifdef HAVE_SOPLEX
-  {
-    SoplexLp lp_soplex1,lp_soplex2;
-    lpTest(lp_soplex1);
-    aTest(lp_soplex2);
-  }
-#endif
-
-#ifdef HAVE_CLP
-  {
-    ClpLp lp_clp1,lp_clp2;
-    lpTest(lp_clp1);
-    aTest(lp_clp2);
-  }
-#endif
-
-  return 0;
-}
Index: test/mip_test.cc
===================================================================
--- test/mip_test.cc	(revision 485)
+++ 	(revision )
@@ -1,136 +1,0 @@
-/* -*- mode: C++; indent-tabs-mode: nil; -*-
- *
- * This file is a part of LEMON, a generic C++ optimization library.
- *
- * Copyright (C) 2003-2008
- * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
- * (Egervary Research Group on Combinatorial Optimization, EGRES).
- *
- * 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 "test_tools.h"
-
-
-#ifdef HAVE_CONFIG_H
-#include <lemon/config.h>
-#endif
-
-#ifdef HAVE_CPLEX
-#include <lemon/cplex.h>
-#endif
-
-#ifdef HAVE_GLPK
-#include <lemon/glpk.h>
-#endif
-
-
-using namespace lemon;
-
-void solveAndCheck(MipSolver& mip, MipSolver::ProblemType stat,
-                   double exp_opt) {
-  using std::string;
-
-  mip.solve();
-  //int decimal,sign;
-  std::ostringstream buf;
-  buf << "Type should be: " << int(stat)<<" and it is "<<int(mip.type());
-
-
-  //  itoa(stat,buf1, 10);
-  check(mip.type()==stat, buf.str());
-
-  if (stat ==  MipSolver::OPTIMAL) {
-    std::ostringstream sbuf;
-    buf << "Wrong optimal value: the right optimum is " << exp_opt;
-    check(std::abs(mip.solValue()-exp_opt) < 1e-3, sbuf.str());
-    //+ecvt(exp_opt,2)
-  }
-}
-
-void aTest(MipSolver& mip)
-{
- //The following example is very simple
-
-
-  typedef MipSolver::Row Row;
-  typedef MipSolver::Col Col;
-
-
-
-  Col x1 = mip.addCol();
-  Col x2 = mip.addCol();
-
-
-  //Objective function
-  mip.obj(x1);
-
-  mip.max();
-
-
-  //Unconstrained optimization
-  mip.solve();
-  //Check it out!
-
-  //Constraints
-  mip.addRow(2*x1+x2 <=2);
-  mip.addRow(x1-2*x2 <=0);
-
-  //Nonnegativity of the variable x1
-  mip.colLowerBound(x1, 0);
-
-  //Maximization of x1
-  //over the triangle with vertices (0,0),(4/5,2/5),(0,2)
-  double expected_opt=4.0/5.0;
-  solveAndCheck(mip, MipSolver::OPTIMAL, expected_opt);
-
-  //Restrict x2 to integer
-  mip.colType(x2,MipSolver::INTEGER);
-  expected_opt=1.0/2.0;
-  solveAndCheck(mip, MipSolver::OPTIMAL, expected_opt);
-
-
-  //Restrict both to integer
-  mip.colType(x1,MipSolver::INTEGER);
-  expected_opt=0;
-  solveAndCheck(mip, MipSolver::OPTIMAL, expected_opt);
-
-
-
-}
-
-
-int main()
-{
-
-#ifdef HAVE_GLPK
-  {
-    GlpkMip mip1;
-    aTest(mip1);
-  }
-#endif
-
-#ifdef HAVE_CPLEX
-  try {
-    CplexMip mip2;
-    aTest(mip2);
-  } catch (CplexEnv::LicenseError& error) {
-#ifdef LEMON_FORCE_CPLEX_CHECK
-    check(false, error.what());
-#else
-    std::cerr << error.what() << std::endl;
-    std::cerr << "Cplex license check failed, lp check skipped" << std::endl;
-#endif
-  }
-#endif
-
-  return 0;
-
-}
