Index: test/graph_adaptor_test.cc
===================================================================
--- test/graph_adaptor_test.cc	(revision 431)
+++ test/graph_adaptor_test.cc	(revision 432)
@@ -1,5 +1,5 @@
-/* -*- C++ -*-
+/* -*- mode: C++; indent-tabs-mode: nil; -*-
  *
- * This file is a part of LEMON, a generic C++ optimization library
+ * This file is a part of LEMON, a generic C++ optimization library.
  *
  * Copyright (C) 2003-2008
@@ -26,6 +26,5 @@
 #include<lemon/concepts/graph.h>
 
-#include<lemon/digraph_adaptor.h>
-#include<lemon/graph_adaptor.h>
+#include<lemon/adaptors.h>
 
 #include <limits>
@@ -38,9 +37,9 @@
 using namespace lemon;
 
-void checkRevDigraphAdaptor() {
-  checkConcept<concepts::Digraph, RevDigraphAdaptor<concepts::Digraph> >();
+void checkReverseDigraph() {
+  checkConcept<concepts::Digraph, ReverseDigraph<concepts::Digraph> >();
 
   typedef ListDigraph Digraph;
-  typedef RevDigraphAdaptor<Digraph> Adaptor;
+  typedef ReverseDigraph<Digraph> Adaptor;
 
   Digraph digraph;
@@ -54,5 +53,5 @@
   Digraph::Arc a2 = digraph.addArc(n1, n3);
   Digraph::Arc a3 = digraph.addArc(n2, n3);
-  
+
   checkGraphNodeList(adaptor, 3);
   checkGraphArcList(adaptor, 3);
@@ -79,7 +78,7 @@
 }
 
-void checkSubDigraphAdaptor() {
-  checkConcept<concepts::Digraph, 
-    SubDigraphAdaptor<concepts::Digraph, 
+void checkSubDigraph() {
+  checkConcept<concepts::Digraph,
+    SubDigraph<concepts::Digraph,
     concepts::Digraph::NodeMap<bool>,
     concepts::Digraph::ArcMap<bool> > >();
@@ -88,5 +87,5 @@
   typedef Digraph::NodeMap<bool> NodeFilter;
   typedef Digraph::ArcMap<bool> ArcFilter;
-  typedef SubDigraphAdaptor<Digraph, NodeFilter, ArcFilter> Adaptor;
+  typedef SubDigraph<Digraph, NodeFilter, ArcFilter> Adaptor;
 
   Digraph digraph;
@@ -124,5 +123,5 @@
   checkGraphArcMap(adaptor);
 
-  arc_filter[a2] = false; 
+  arc_filter[a2] = false;
 
   checkGraphNodeList(adaptor, 3);
@@ -144,5 +143,5 @@
   checkGraphArcMap(adaptor);
 
-  node_filter[n1] = false; 
+  node_filter[n1] = false;
 
   checkGraphNodeList(adaptor, 2);
@@ -176,12 +175,12 @@
 }
 
-void checkNodeSubDigraphAdaptor() {
-  checkConcept<concepts::Digraph, 
-    NodeSubDigraphAdaptor<concepts::Digraph, 
+void checkFilterNodes1() {
+  checkConcept<concepts::Digraph,
+    FilterNodes<concepts::Digraph,
       concepts::Digraph::NodeMap<bool> > >();
 
   typedef ListDigraph Digraph;
   typedef Digraph::NodeMap<bool> NodeFilter;
-  typedef NodeSubDigraphAdaptor<Digraph, NodeFilter> Adaptor;
+  typedef FilterNodes<Digraph, NodeFilter> Adaptor;
 
   Digraph digraph;
@@ -217,5 +216,5 @@
   checkGraphArcMap(adaptor);
 
-  node_filter[n1] = false; 
+  node_filter[n1] = false;
 
   checkGraphNodeList(adaptor, 2);
@@ -248,12 +247,12 @@
 }
 
-void checkArcSubDigraphAdaptor() {
-  checkConcept<concepts::Digraph, 
-    ArcSubDigraphAdaptor<concepts::Digraph, 
+void checkFilterArcs() {
+  checkConcept<concepts::Digraph,
+    FilterArcs<concepts::Digraph,
     concepts::Digraph::ArcMap<bool> > >();
 
   typedef ListDigraph Digraph;
   typedef Digraph::ArcMap<bool> ArcFilter;
-  typedef ArcSubDigraphAdaptor<Digraph, ArcFilter> Adaptor;
+  typedef FilterArcs<Digraph, ArcFilter> Adaptor;
 
   Digraph digraph;
@@ -289,5 +288,5 @@
   checkGraphArcMap(adaptor);
 
-  arc_filter[a2] = false; 
+  arc_filter[a2] = false;
 
   checkGraphNodeList(adaptor, 3);
@@ -322,9 +321,9 @@
 }
 
-void checkUndirDigraphAdaptor() {
-  checkConcept<concepts::Graph, UndirDigraphAdaptor<concepts::Digraph> >();
+void checkUndirector() {
+  checkConcept<concepts::Graph, Undirector<concepts::Digraph> >();
 
   typedef ListDigraph Digraph;
-  typedef UndirDigraphAdaptor<Digraph> Adaptor;
+  typedef Undirector<Digraph> Adaptor;
 
   Digraph digraph;
@@ -338,5 +337,5 @@
   Digraph::Arc a2 = digraph.addArc(n1, n3);
   Digraph::Arc a3 = digraph.addArc(n2, n3);
-  
+
   checkGraphNodeList(adaptor, 3);
   checkGraphArcList(adaptor, 6);
@@ -372,13 +371,13 @@
 }
 
-void checkResDigraphAdaptor() {
-  checkConcept<concepts::Digraph, 
-    ResDigraphAdaptor<concepts::Digraph, 
-    concepts::Digraph::ArcMap<int>, 
+void checkResidual() {
+  checkConcept<concepts::Digraph,
+    Residual<concepts::Digraph,
+    concepts::Digraph::ArcMap<int>,
     concepts::Digraph::ArcMap<int> > >();
 
   typedef ListDigraph Digraph;
   typedef Digraph::ArcMap<int> IntArcMap;
-  typedef ResDigraphAdaptor<Digraph, IntArcMap> Adaptor;
+  typedef Residual<Digraph, IntArcMap> Adaptor;
 
   Digraph digraph;
@@ -408,5 +407,5 @@
     flow[a] = 0;
   }
-  
+
   checkGraphNodeList(adaptor, 4);
   checkGraphArcList(adaptor, 6);
@@ -426,5 +425,5 @@
     flow[a] = capacity[a] / 2;
   }
-  
+
   checkGraphNodeList(adaptor, 4);
   checkGraphArcList(adaptor, 12);
@@ -450,5 +449,5 @@
     flow[a] = capacity[a];
   }
-  
+
   checkGraphNodeList(adaptor, 4);
   checkGraphArcList(adaptor, 6);
@@ -471,15 +470,16 @@
   int flow_value = 0;
   while (true) {
-    
+
     Bfs<Adaptor> bfs(adaptor);
     bfs.run(n1, n4);
-    
+
     if (!bfs.reached(n4)) break;
 
     Path<Adaptor> p = bfs.path(n4);
-    
+
     int min = std::numeric_limits<int>::max();
     for (Path<Adaptor>::ArcIt a(p); a != INVALID; ++a) {
-      if (adaptor.rescap(a) < min) min = adaptor.rescap(a);
+      if (adaptor.residualCapacity(a) < min)
+        min = adaptor.residualCapacity(a);
     }
 
@@ -494,9 +494,9 @@
 }
 
-void checkSplitDigraphAdaptor() {
-  checkConcept<concepts::Digraph, SplitDigraphAdaptor<concepts::Digraph> >();
+void checkSplitNodes() {
+  checkConcept<concepts::Digraph, SplitNodes<concepts::Digraph> >();
 
   typedef ListDigraph Digraph;
-  typedef SplitDigraphAdaptor<Digraph> Adaptor;
+  typedef SplitNodes<Digraph> Adaptor;
 
   Digraph digraph;
@@ -510,5 +510,5 @@
   Digraph::Arc a2 = digraph.addArc(n1, n3);
   Digraph::Arc a3 = digraph.addArc(n2, n3);
-  
+
   checkGraphNodeList(adaptor, 6);
   checkGraphArcList(adaptor, 6);
@@ -531,5 +531,5 @@
   checkNodeIds(adaptor);
   checkArcIds(adaptor);
-  
+
   checkGraphNodeMap(adaptor);
   checkGraphArcMap(adaptor);
@@ -538,8 +538,8 @@
     if (adaptor.origArc(a)) {
       Digraph::Arc oa = a;
-      check(adaptor.source(a) == adaptor.outNode(digraph.source(oa)), 
-	    "Wrong split");
-      check(adaptor.target(a) == adaptor.inNode(digraph.target(oa)), 
-	    "Wrong split"); 
+      check(adaptor.source(a) == adaptor.outNode(digraph.source(oa)),
+            "Wrong split");
+      check(adaptor.target(a) == adaptor.inNode(digraph.target(oa)),
+            "Wrong split");
     } else {
       Digraph::Node on = a;
@@ -550,7 +550,7 @@
 }
 
-void checkSubGraphAdaptor() {
-  checkConcept<concepts::Graph, 
-    SubGraphAdaptor<concepts::Graph, 
+void checkSubGraph() {
+  checkConcept<concepts::Graph,
+    SubGraph<concepts::Graph,
     concepts::Graph::NodeMap<bool>,
     concepts::Graph::EdgeMap<bool> > >();
@@ -559,5 +559,5 @@
   typedef Graph::NodeMap<bool> NodeFilter;
   typedef Graph::EdgeMap<bool> EdgeFilter;
-  typedef SubGraphAdaptor<Graph, NodeFilter, EdgeFilter> Adaptor;
+  typedef SubGraph<Graph, NodeFilter, EdgeFilter> Adaptor;
 
   Graph graph;
@@ -608,5 +608,5 @@
   checkGraphEdgeMap(adaptor);
 
-  edge_filter[e2] = false; 
+  edge_filter[e2] = false;
 
   checkGraphNodeList(adaptor, 4);
@@ -639,5 +639,5 @@
   checkGraphEdgeMap(adaptor);
 
-  node_filter[n1] = false; 
+  node_filter[n1] = false;
 
   checkGraphNodeList(adaptor, 3);
@@ -685,12 +685,12 @@
 }
 
-void checkNodeSubGraphAdaptor() {
-  checkConcept<concepts::Graph, 
-    NodeSubGraphAdaptor<concepts::Graph, 
+void checkFilterNodes2() {
+  checkConcept<concepts::Graph,
+    FilterNodes<concepts::Graph,
       concepts::Graph::NodeMap<bool> > >();
 
   typedef ListGraph Graph;
   typedef Graph::NodeMap<bool> NodeFilter;
-  typedef NodeSubGraphAdaptor<Graph, NodeFilter> Adaptor;
+  typedef FilterNodes<Graph, NodeFilter> Adaptor;
 
   Graph graph;
@@ -739,5 +739,5 @@
   checkGraphEdgeMap(adaptor);
 
-  node_filter[n1] = false; 
+  node_filter[n1] = false;
 
   checkGraphNodeList(adaptor, 3);
@@ -784,12 +784,12 @@
 }
 
-void checkEdgeSubGraphAdaptor() {
-  checkConcept<concepts::Graph, 
-    EdgeSubGraphAdaptor<concepts::Graph, 
+void checkFilterEdges() {
+  checkConcept<concepts::Graph,
+    FilterEdges<concepts::Graph,
     concepts::Graph::EdgeMap<bool> > >();
 
   typedef ListGraph Graph;
   typedef Graph::EdgeMap<bool> EdgeFilter;
-  typedef EdgeSubGraphAdaptor<Graph, EdgeFilter> Adaptor;
+  typedef FilterEdges<Graph, EdgeFilter> Adaptor;
 
   Graph graph;
@@ -838,5 +838,5 @@
   checkGraphEdgeMap(adaptor);
 
-  edge_filter[e2] = false; 
+  edge_filter[e2] = false;
 
   checkGraphNodeList(adaptor, 4);
@@ -886,11 +886,11 @@
 }
 
-void checkDirGraphAdaptor() {
-  checkConcept<concepts::Digraph, 
-    DirGraphAdaptor<concepts::Graph, concepts::Graph::EdgeMap<bool> > >();
+void checkOrienter() {
+  checkConcept<concepts::Digraph,
+    Orienter<concepts::Graph, concepts::Graph::EdgeMap<bool> > >();
 
   typedef ListGraph Graph;
   typedef ListGraph::EdgeMap<bool> DirMap;
-  typedef DirGraphAdaptor<Graph> Adaptor;
+  typedef Orienter<Graph> Adaptor;
 
   Graph graph;
@@ -905,14 +905,14 @@
   Graph::Edge e2 = graph.addEdge(n1, n3);
   Graph::Edge e3 = graph.addEdge(n2, n3);
-  
+
   checkGraphNodeList(adaptor, 3);
   checkGraphArcList(adaptor, 3);
   checkGraphConArcList(adaptor, 3);
-  
+
   {
     dir[e1] = true;
     Adaptor::Node u = adaptor.source(e1);
     Adaptor::Node v = adaptor.target(e1);
-    
+
     dir[e1] = false;
     check (u == adaptor.target(e1), "Wrong dir");
@@ -927,5 +927,5 @@
     Adaptor::Node u = adaptor.source(e2);
     Adaptor::Node v = adaptor.target(e2);
-    
+
     dir[e2] = false;
     check (u == adaptor.target(e2), "Wrong dir");
@@ -940,5 +940,5 @@
     Adaptor::Node u = adaptor.source(e3);
     Adaptor::Node v = adaptor.target(e3);
-    
+
     dir[e3] = false;
     check (u == adaptor.target(e3), "Wrong dir");
@@ -968,16 +968,16 @@
 int main(int, const char **) {
 
-  checkRevDigraphAdaptor();
-  checkSubDigraphAdaptor();
-  checkNodeSubDigraphAdaptor();
-  checkArcSubDigraphAdaptor();
-  checkUndirDigraphAdaptor();
-  checkResDigraphAdaptor();
-  checkSplitDigraphAdaptor();
-
-  checkSubGraphAdaptor();
-  checkNodeSubGraphAdaptor();
-  checkEdgeSubGraphAdaptor();
-  checkDirGraphAdaptor();
+  checkReverseDigraph();
+  checkSubDigraph();
+  checkFilterNodes1();
+  checkFilterArcs();
+  checkUndirector();
+  checkResidual();
+  checkSplitNodes();
+
+  checkSubGraph();
+  checkFilterNodes2();
+  checkFilterEdges();
+  checkOrienter();
 
   return 0;
