Index: src/work/iterator_bfs_demo.cc
===================================================================
--- src/work/iterator_bfs_demo.cc	(revision 174)
+++ src/work/iterator_bfs_demo.cc	(revision 234)
@@ -79,14 +79,14 @@
   
 //   typedef TrivGraphWrapper<const Graph> CGW;
-//   CGW wG(G);
+//   CGW gw(G);
 
 //   cout << "bfs and dfs demo on the directed graph" << endl;
-//   for(CGW::NodeIt n=wG.first<CGW::NodeIt>(); n.valid(); ++n) { 
+//   for(CGW::NodeIt n=gw.first<CGW::NodeIt>(); n.valid(); ++n) { 
 //     cout << n << ": ";
 //     cout << "out edges: ";
-//     for(CGW::OutEdgeIt e=wG.first<CGW::OutEdgeIt>(n); e.valid(); ++e) 
+//     for(CGW::OutEdgeIt e=gw.first<CGW::OutEdgeIt>(n); e.valid(); ++e) 
 //       cout << e << " ";
 //     cout << "in edges: ";
-//     for(CGW::InEdgeIt e=wG.first<CGW::InEdgeIt>(n); e.valid(); ++e) 
+//     for(CGW::InEdgeIt e=gw.first<CGW::InEdgeIt>(n); e.valid(); ++e) 
 //       cout << e << " ";
 //     cout << endl;
@@ -95,16 +95,16 @@
   {
     typedef TrivGraphWrapper<const Graph> GW;
-    GW wG(G);
-
-    EdgeNameMap< GW, Graph::NodeMap<string> > edge_name(wG, node_name);
+    GW gw(G);
+
+    EdgeNameMap< GW, Graph::NodeMap<string> > edge_name(gw, node_name);
     
     cout << "bfs and dfs iterator demo on the directed graph" << endl;
-    for(GW::NodeIt n=wG.first<GW::NodeIt>(); wG.valid(n); wG.next(n)) { 
+    for(GW::NodeIt n=gw.first<GW::NodeIt>(); gw.valid(n); gw.next(n)) { 
       cout << node_name.get(n) << ": ";
       cout << "out edges: ";
-      for(GW::OutEdgeIt e=wG.first<GW::OutEdgeIt>(n); wG.valid(e); wG.next(e)) 
+      for(GW::OutEdgeIt e=gw.first<GW::OutEdgeIt>(n); gw.valid(e); gw.next(e)) 
 	cout << edge_name.get(e) << " ";
       cout << "in edges: ";
-      for(GW::InEdgeIt e=wG.first<GW::InEdgeIt>(n); wG.valid(e); wG.next(e)) 
+      for(GW::InEdgeIt e=gw.first<GW::InEdgeIt>(n); gw.valid(e); gw.next(e)) 
 	cout << edge_name.get(e) << " ";
       cout << endl;
@@ -112,20 +112,20 @@
 
     cout << "bfs from s ..." << endl;
-    BfsIterator5< GW, GW::NodeMap<bool> > bfs(wG);
+    BfsIterator5< GW, GW::NodeMap<bool> > bfs(gw);
     bfs.pushAndSetReached(s);
     while (!bfs.finished()) {
       //cout << "edge: ";
-      if (wG.valid(bfs)) {
+      if (gw.valid(bfs)) {
 	cout << edge_name.get(bfs) << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(wG.aNode(bfs)) << 
-	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ node_name.get(wG.bNode(bfs)) << 
+	  node_name.get(gw.aNode(bfs)) << 
+	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name.get(gw.bNode(bfs)) << 
 	  (bfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(bfs.aNode()) << 
-	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ 
+	  node_name.get(bfs.aNode()) << 
+	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  
 	  "invalid.";
       }
@@ -145,21 +145,21 @@
 
     cout << "dfs from s ..." << endl;
-    DfsIterator5< GW, GW::NodeMap<bool> > dfs(wG);
+    DfsIterator5< GW, GW::NodeMap<bool> > dfs(gw);
     dfs.pushAndSetReached(s);
     while (!dfs.finished()) {
       ++dfs;
       //cout << "edge: ";
-      if (wG.valid(dfs)) {
+      if (gw.valid(dfs)) {
 	cout << edge_name.get(dfs) << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(wG.aNode(dfs)) << 
-	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ node_name.get(wG.bNode(dfs)) << 
+	  node_name.get(gw.aNode(dfs)) << 
+	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name.get(gw.bNode(dfs)) << 
 	  (dfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(dfs.aNode()) << 
-	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ 
+	  node_name.get(dfs.aNode()) << 
+	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  
 	  "invalid.";
       }
@@ -170,17 +170,17 @@
 
   {
-    typedef RevGraphWrapper<const Graph> GW;
-    GW wG(G);
-    
-    EdgeNameMap< GW, Graph::NodeMap<string> > edge_name(wG, node_name);
+    typedef RevGraphWrapper<const TrivGraphWrapper<const Graph> > GW;
+    GW gw(G);
+    
+    EdgeNameMap< GW, Graph::NodeMap<string> > edge_name(gw, node_name);
     
     cout << "bfs and dfs iterator demo on the reversed directed graph" << endl;
-    for(GW::NodeIt n=wG.first<GW::NodeIt>(); wG.valid(n); wG.next(n)) { 
+    for(GW::NodeIt n=gw.first<GW::NodeIt>(); gw.valid(n); gw.next(n)) { 
       cout << node_name.get(n) << ": ";
       cout << "out edges: ";
-      for(GW::OutEdgeIt e=wG.first<GW::OutEdgeIt>(n); wG.valid(e); wG.next(e)) 
+      for(GW::OutEdgeIt e=gw.first<GW::OutEdgeIt>(n); gw.valid(e); gw.next(e)) 
 	cout << edge_name.get(e) << " ";
       cout << "in edges: ";
-      for(GW::InEdgeIt e=wG.first<GW::InEdgeIt>(n); wG.valid(e); wG.next(e)) 
+      for(GW::InEdgeIt e=gw.first<GW::InEdgeIt>(n); gw.valid(e); gw.next(e)) 
 	cout << edge_name.get(e) << " ";
       cout << endl;
@@ -188,20 +188,20 @@
 
     cout << "bfs from t ..." << endl;
-    BfsIterator5< GW, GW::NodeMap<bool> > bfs(wG);
+    BfsIterator5< GW, GW::NodeMap<bool> > bfs(gw);
     bfs.pushAndSetReached(t);
     while (!bfs.finished()) {
       //cout << "edge: ";
-      if (wG.valid(bfs)) {
+      if (gw.valid(bfs)) {
 	cout << edge_name.get(bfs) << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(wG.aNode(bfs)) << 
-	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ node_name.get(wG.bNode(bfs)) << 
+	  node_name.get(gw.aNode(bfs)) << 
+	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name.get(gw.bNode(bfs)) << 
 	  (bfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(bfs.aNode()) << 
-	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ 
+	  node_name.get(bfs.aNode()) << 
+	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  
 	  "invalid.";
       }
@@ -221,21 +221,21 @@
     
     cout << "dfs from t ..." << endl;
-    DfsIterator5< GW, GW::NodeMap<bool> > dfs(wG);
+    DfsIterator5< GW, GW::NodeMap<bool> > dfs(gw);
     dfs.pushAndSetReached(t);
     while (!dfs.finished()) {
       ++dfs;
       //cout << "edge: ";
-      if (wG.valid(dfs)) {
+      if (gw.valid(dfs)) {
 	cout << edge_name.get(dfs) << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(wG.aNode(dfs)) << 
-	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ node_name.get(wG.bNode(dfs)) << 
+	  node_name.get(gw.aNode(dfs)) << 
+	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name.get(gw.bNode(dfs)) << 
 	  (dfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(dfs.aNode()) << 
-	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ 
+	  node_name.get(dfs.aNode()) << 
+	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  
 	  "invalid.";
       }
@@ -246,16 +246,16 @@
   {
     typedef UndirGraphWrapper<const Graph> GW;
-    GW wG(G);
-    
-    EdgeNameMap< GW, Graph::NodeMap<string> > edge_name(wG, node_name);
+    GW gw(G);
+    
+    EdgeNameMap< GW, Graph::NodeMap<string> > edge_name(gw, node_name);
     
     cout << "bfs and dfs iterator demo on the undirected graph" << endl;
-    for(GW::NodeIt n=wG.first<GW::NodeIt>(); wG.valid(n); wG.next(n)) { 
+    for(GW::NodeIt n=gw.first<GW::NodeIt>(); gw.valid(n); gw.next(n)) { 
       cout << node_name.get(n) << ": ";
       cout << "out edges: ";
-      for(GW::OutEdgeIt e=wG.first<GW::OutEdgeIt>(n); wG.valid(e); wG.next(e)) 
+      for(GW::OutEdgeIt e=gw.first<GW::OutEdgeIt>(n); gw.valid(e); gw.next(e)) 
 	cout << edge_name.get(e) << " ";
       cout << "in edges: ";
-      for(GW::InEdgeIt e=wG.first<GW::InEdgeIt>(n); wG.valid(e); wG.next(e)) 
+      for(GW::InEdgeIt e=gw.first<GW::InEdgeIt>(n); gw.valid(e); gw.next(e)) 
 	cout << edge_name.get(e) << " ";
       cout << endl;
@@ -263,20 +263,20 @@
 
     cout << "bfs from t ..." << endl;
-    BfsIterator5< GW, GW::NodeMap<bool> > bfs(wG);
+    BfsIterator5< GW, GW::NodeMap<bool> > bfs(gw);
     bfs.pushAndSetReached(t);
     while (!bfs.finished()) {
       //cout << "edge: ";
-      if (wG.valid(GW::OutEdgeIt(bfs))) {
+      if (gw.valid(GW::OutEdgeIt(bfs))) {
 	cout << edge_name.get(GW::OutEdgeIt(bfs)) << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(wG.aNode(bfs)) << 
-	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ node_name.get(wG.bNode(bfs)) << 
+	  node_name.get(gw.aNode(bfs)) << 
+	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name.get(gw.bNode(bfs)) << 
 	  (bfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(bfs.aNode()) << 
-	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ 
+	  node_name.get(bfs.aNode()) << 
+	  (bfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  
 	  "invalid.";
       }
@@ -296,21 +296,21 @@
     
     cout << "dfs from t ..." << endl;
-    DfsIterator5< GW, GW::NodeMap<bool> > dfs(wG);
+    DfsIterator5< GW, GW::NodeMap<bool> > dfs(gw);
     dfs.pushAndSetReached(t);
     while (!dfs.finished()) {
       ++dfs;
       //cout << "edge: ";
-      if (wG.valid(GW::OutEdgeIt(dfs))) {
+      if (gw.valid(GW::OutEdgeIt(dfs))) {
 	cout << edge_name.get(GW::OutEdgeIt(dfs)) << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(wG.aNode(dfs)) << 
-	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ node_name.get(wG.bNode(dfs)) << 
+	  node_name.get(gw.aNode(dfs)) << 
+	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  node_name.get(gw.bNode(dfs)) << 
 	  (dfs.isBNodeNewlyReached() ? ": is newly reached." : 
 	   ": is not newly reached.");
       } else { 
 	cout << "invalid" << /*endl*/", " << 
-	  /*" aNode: " <<*/ node_name.get(dfs.aNode()) << 
-	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
-	  /*" bNode: " <<*/ 
+	  node_name.get(dfs.aNode()) << 
+	  (dfs.isANodeExamined() ? ": is examined, " : ": is not examined, ") << 
+	  
 	  "invalid.";
       }
