# HG changeset patch
# User Balazs Dezso <deba@inf.elte.hu>
# Date 1326316867 -3600
# Node ID 699c7eac2c6dea417e75c9d4432f5944938f97d8
# Parent  c8fa41fcc4a70873b604e769c68110949cb6e75b
Renamings in BpGraphs (#69)
 - RedIt->RedNodeIt
 - BlueIt->BlueNodeIt
 - RedMap->RedNodeMap
 - BlueMap->BlueNodeMap

diff -r c8fa41fcc4a7 -r 699c7eac2c6d lemon/bits/graph_extender.h
--- a/lemon/bits/graph_extender.h	Thu Dec 01 09:05:47 2011 +0100
+++ b/lemon/bits/graph_extender.h	Wed Jan 11 22:21:07 2012 +0100
@@ -913,44 +913,44 @@
 
     };
 
-    class RedIt : public RedNode {
+    class RedNodeIt : public RedNode {
       const BpGraph* _graph;
     public:
 
-      RedIt() {}
+      RedNodeIt() {}
 
-      RedIt(Invalid i) : RedNode(i) { }
+      RedNodeIt(Invalid i) : RedNode(i) { }
 
-      explicit RedIt(const BpGraph& graph) : _graph(&graph) {
+      explicit RedNodeIt(const BpGraph& graph) : _graph(&graph) {
         _graph->first(static_cast<RedNode&>(*this));
       }
 
-      RedIt(const BpGraph& graph, const RedNode& node)
+      RedNodeIt(const BpGraph& graph, const RedNode& node)
         : RedNode(node), _graph(&graph) {}
 
-      RedIt& operator++() {
+      RedNodeIt& operator++() {
         _graph->next(static_cast<RedNode&>(*this));
         return *this;
       }
 
     };
 
-    class BlueIt : public BlueNode {
+    class BlueNodeIt : public BlueNode {
       const BpGraph* _graph;
     public:
 
-      BlueIt() {}
+      BlueNodeIt() {}
 
-      BlueIt(Invalid i) : BlueNode(i) { }
+      BlueNodeIt(Invalid i) : BlueNode(i) { }
 
-      explicit BlueIt(const BpGraph& graph) : _graph(&graph) {
+      explicit BlueNodeIt(const BpGraph& graph) : _graph(&graph) {
         _graph->first(static_cast<BlueNode&>(*this));
       }
 
-      BlueIt(const BpGraph& graph, const BlueNode& node)
+      BlueNodeIt(const BpGraph& graph, const BlueNode& node)
         : BlueNode(node), _graph(&graph) {}
 
-      BlueIt& operator++() {
+      BlueNodeIt& operator++() {
         _graph->next(static_cast<BlueNode&>(*this));
         return *this;
       }
@@ -1144,23 +1144,23 @@
     };
 
     template <typename _Value>
-    class RedMap
+    class RedNodeMap
       : public MapExtender<DefaultMap<BpGraph, RedNode, _Value> > {
       typedef MapExtender<DefaultMap<BpGraph, RedNode, _Value> > Parent;
 
     public:
-      explicit RedMap(const BpGraph& bpgraph)
+      explicit RedNodeMap(const BpGraph& bpgraph)
         : Parent(bpgraph) {}
-      RedMap(const BpGraph& bpgraph, const _Value& value)
+      RedNodeMap(const BpGraph& bpgraph, const _Value& value)
         : Parent(bpgraph, value) {}
 
     private:
-      RedMap& operator=(const RedMap& cmap) {
-        return operator=<RedMap>(cmap);
+      RedNodeMap& operator=(const RedNodeMap& cmap) {
+        return operator=<RedNodeMap>(cmap);
       }
 
       template <typename CMap>
-      RedMap& operator=(const CMap& cmap) {
+      RedNodeMap& operator=(const CMap& cmap) {
         Parent::operator=(cmap);
         return *this;
       }
@@ -1168,23 +1168,23 @@
     };
 
     template <typename _Value>
-    class BlueMap
+    class BlueNodeMap
       : public MapExtender<DefaultMap<BpGraph, BlueNode, _Value> > {
       typedef MapExtender<DefaultMap<BpGraph, BlueNode, _Value> > Parent;
 
     public:
-      explicit BlueMap(const BpGraph& bpgraph)
+      explicit BlueNodeMap(const BpGraph& bpgraph)
         : Parent(bpgraph) {}
-      BlueMap(const BpGraph& bpgraph, const _Value& value)
+      BlueNodeMap(const BpGraph& bpgraph, const _Value& value)
         : Parent(bpgraph, value) {}
 
     private:
-      BlueMap& operator=(const BlueMap& cmap) {
-        return operator=<BlueMap>(cmap);
+      BlueNodeMap& operator=(const BlueNodeMap& cmap) {
+        return operator=<BlueNodeMap>(cmap);
       }
 
       template <typename CMap>
-      BlueMap& operator=(const CMap& cmap) {
+      BlueNodeMap& operator=(const CMap& cmap) {
         Parent::operator=(cmap);
         return *this;
       }
diff -r c8fa41fcc4a7 -r 699c7eac2c6d lemon/bits/traits.h
--- a/lemon/bits/traits.h	Thu Dec 01 09:05:47 2011 +0100
+++ b/lemon/bits/traits.h	Wed Jan 11 22:21:07 2012 +0100
@@ -172,16 +172,16 @@
     typedef GR Digraph;
 
     typedef typename GR::RedNode Item;
-    typedef typename GR::RedIt ItemIt;
+    typedef typename GR::RedNodeIt ItemIt;
 
     typedef typename RedNodeNotifierIndicator<GR>::Type ItemNotifier;
 
     template <typename V>
-    class Map : public GR::template RedMap<V> {
-      typedef typename GR::template RedMap<V> Parent;
+    class Map : public GR::template RedNodeMap<V> {
+      typedef typename GR::template RedNodeMap<V> Parent;
 
     public:
-      typedef typename GR::template RedMap<V> Type;
+      typedef typename GR::template RedNodeMap<V> Type;
       typedef typename Parent::Value Value;
 
       Map(const GR& _bpgraph) : Parent(_bpgraph) {}
@@ -213,16 +213,16 @@
     typedef GR Digraph;
 
     typedef typename GR::BlueNode Item;
-    typedef typename GR::BlueIt ItemIt;
+    typedef typename GR::BlueNodeIt ItemIt;
 
     typedef typename BlueNodeNotifierIndicator<GR>::Type ItemNotifier;
 
     template <typename V>
-    class Map : public GR::template BlueMap<V> {
-      typedef typename GR::template BlueMap<V> Parent;
+    class Map : public GR::template BlueNodeMap<V> {
+      typedef typename GR::template BlueNodeMap<V> Parent;
 
     public:
-      typedef typename GR::template BlueMap<V> Type;
+      typedef typename GR::template BlueNodeMap<V> Type;
       typedef typename Parent::Value Value;
 
       Map(const GR& _bpgraph) : Parent(_bpgraph) {}
diff -r c8fa41fcc4a7 -r 699c7eac2c6d lemon/concepts/bpgraph.h
--- a/lemon/concepts/bpgraph.h	Thu Dec 01 09:05:47 2011 +0100
+++ b/lemon/concepts/bpgraph.h	Wed Jan 11 22:21:07 2012 +0100
@@ -48,9 +48,9 @@
     /// The bipartite graphs also fulfill the concept of \ref Graph
     /// "undirected graphs". Bipartite graphs provide a bipartition of
     /// the node set, namely a red and blue set of the nodes. The
-    /// nodes can be iterated with the RedIt and BlueIt in the two
-    /// node sets. With RedMap and BlueMap values can be assigned to
-    /// the nodes in the two sets.
+    /// nodes can be iterated with the RedNodeIt and BlueNodeIt in the
+    /// two node sets. With RedNodeMap and BlueNodeMap values can be
+    /// assigned to the nodes in the two sets.
     ///
     /// The edges of the graph cannot connect two nodes of the same
     /// set. The edges inherent orientation is from the red nodes to
@@ -187,38 +187,38 @@
       /// int count=0;
       /// for (BpGraph::RedNodeIt n(g); n!=INVALID; ++n) ++count;
       ///\endcode
-      class RedIt : public RedNode {
+      class RedNodeIt : public RedNode {
       public:
         /// Default constructor
 
         /// Default constructor.
         /// \warning It sets the iterator to an undefined value.
-        RedIt() { }
+        RedNodeIt() { }
         /// Copy constructor.
 
         /// Copy constructor.
         ///
-        RedIt(const RedIt& n) : RedNode(n) { }
+        RedNodeIt(const RedNodeIt& n) : RedNode(n) { }
         /// %Invalid constructor \& conversion.
 
         /// Initializes the iterator to be invalid.
         /// \sa Invalid for more details.
-        RedIt(Invalid) { }
+        RedNodeIt(Invalid) { }
         /// Sets the iterator to the first red node.
 
         /// Sets the iterator to the first red node of the given
         /// digraph.
-        explicit RedIt(const BpGraph&) { }
+        explicit RedNodeIt(const BpGraph&) { }
         /// Sets the iterator to the given red node.
 
         /// Sets the iterator to the given red node of the given
         /// digraph.
-        RedIt(const BpGraph&, const RedNode&) { }
+        RedNodeIt(const BpGraph&, const RedNode&) { }
         /// Next node.
 
         /// Assign the iterator to the next red node.
         ///
-        RedIt& operator++() { return *this; }
+        RedNodeIt& operator++() { return *this; }
       };
 
       /// Iterator class for the blue nodes.
@@ -230,38 +230,38 @@
       /// int count=0;
       /// for (BpGraph::BlueNodeIt n(g); n!=INVALID; ++n) ++count;
       ///\endcode
-      class BlueIt : public BlueNode {
+      class BlueNodeIt : public BlueNode {
       public:
         /// Default constructor
 
         /// Default constructor.
         /// \warning It sets the iterator to an undefined value.
-        BlueIt() { }
+        BlueNodeIt() { }
         /// Copy constructor.
 
         /// Copy constructor.
         ///
-        BlueIt(const BlueIt& n) : BlueNode(n) { }
+        BlueNodeIt(const BlueNodeIt& n) : BlueNode(n) { }
         /// %Invalid constructor \& conversion.
 
         /// Initializes the iterator to be invalid.
         /// \sa Invalid for more details.
-        BlueIt(Invalid) { }
+        BlueNodeIt(Invalid) { }
         /// Sets the iterator to the first blue node.
 
         /// Sets the iterator to the first blue node of the given
         /// digraph.
-        explicit BlueIt(const BpGraph&) { }
+        explicit BlueNodeIt(const BpGraph&) { }
         /// Sets the iterator to the given blue node.
 
         /// Sets the iterator to the given blue node of the given
         /// digraph.
-        BlueIt(const BpGraph&, const BlueNode&) { }
+        BlueNodeIt(const BpGraph&, const BlueNode&) { }
         /// Next node.
 
         /// Assign the iterator to the next blue node.
         ///
-        BlueIt& operator++() { return *this; }
+        BlueNodeIt& operator++() { return *this; }
       };
 
       /// Iterator class for the nodes.
@@ -663,22 +663,22 @@
       /// Standard graph map type for the red nodes.
       /// It conforms to the ReferenceMap concept.
       template<class T>
-      class RedMap : public ReferenceMap<Node, T, T&, const T&>
+      class RedNodeMap : public ReferenceMap<Node, T, T&, const T&>
       {
       public:
 
         /// Constructor
-        explicit RedMap(const BpGraph&) { }
+        explicit RedNodeMap(const BpGraph&) { }
         /// Constructor with given initial value
-        RedMap(const BpGraph&, T) { }
+        RedNodeMap(const BpGraph&, T) { }
 
       private:
         ///Copy constructor
-        RedMap(const RedMap& nm) :
+        RedNodeMap(const RedNodeMap& nm) :
           ReferenceMap<Node, T, T&, const T&>(nm) { }
         ///Assignment operator
         template <typename CMap>
-        RedMap& operator=(const CMap&) {
+        RedNodeMap& operator=(const CMap&) {
           checkConcept<ReadMap<Node, T>, CMap>();
           return *this;
         }
@@ -689,22 +689,22 @@
       /// Standard graph map type for the blue nodes.
       /// It conforms to the ReferenceMap concept.
       template<class T>
-      class BlueMap : public ReferenceMap<Node, T, T&, const T&>
+      class BlueNodeMap : public ReferenceMap<Node, T, T&, const T&>
       {
       public:
 
         /// Constructor
-        explicit BlueMap(const BpGraph&) { }
+        explicit BlueNodeMap(const BpGraph&) { }
         /// Constructor with given initial value
-        BlueMap(const BpGraph&, T) { }
+        BlueNodeMap(const BpGraph&, T) { }
 
       private:
         ///Copy constructor
-        BlueMap(const BlueMap& nm) :
+        BlueNodeMap(const BlueNodeMap& nm) :
           ReferenceMap<Node, T, T&, const T&>(nm) { }
         ///Assignment operator
         template <typename CMap>
-        BlueMap& operator=(const CMap&) {
+        BlueNodeMap& operator=(const CMap&) {
           checkConcept<ReadMap<Node, T>, CMap>();
           return *this;
         }
diff -r c8fa41fcc4a7 -r 699c7eac2c6d lemon/concepts/graph_components.h
--- a/lemon/concepts/graph_components.h	Thu Dec 01 09:05:47 2011 +0100
+++ b/lemon/concepts/graph_components.h	Wed Jan 11 22:21:07 2012 +0100
@@ -1206,12 +1206,12 @@
       /// \brief This iterator goes through each red node.
       ///
       /// This iterator goes through each red node.
-      typedef GraphItemIt<BpGraph, RedNode> RedIt;
+      typedef GraphItemIt<BpGraph, RedNode> RedNodeIt;
 
       /// \brief This iterator goes through each blue node.
       ///
       /// This iterator goes through each blue node.
-      typedef GraphItemIt<BpGraph, BlueNode> BlueIt;
+      typedef GraphItemIt<BpGraph, BlueNode> BlueNodeIt;
 
       /// @}
 
@@ -1228,9 +1228,9 @@
           bpgraph.next(bn);
 
           checkConcept<GraphItemIt<_BpGraph, typename _BpGraph::RedNode>,
-            typename _BpGraph::RedIt>();
+            typename _BpGraph::RedNodeIt>();
           checkConcept<GraphItemIt<_BpGraph, typename _BpGraph::BlueNode>,
-            typename _BpGraph::BlueIt>();
+            typename _BpGraph::BlueNodeIt>();
         }
 
         const _BpGraph& bpgraph;
@@ -1715,7 +1715,8 @@
     /// This class describes the interface of mappable undirected
     /// bipartite graphs.  It extends \ref MappableGraphComponent with
     /// the standard graph map class for red and blue nodes (\c
-    /// RedMap and BlueMap). This concept is part of the BpGraph concept.
+    /// RedNodeMap and BlueNodeMap). This concept is part of the
+    /// BpGraph concept.
     template <typename BAS = BaseBpGraphComponent>
     class MappableBpGraphComponent : public MappableGraphComponent<BAS>  {
     public:
@@ -1730,33 +1731,33 @@
       /// Standard graph map for the red nodes.
       /// It conforms to the ReferenceMap concept.
       template <typename V>
-      class RedMap : public GraphMap<MappableBpGraphComponent, Node, V> {
+      class RedNodeMap : public GraphMap<MappableBpGraphComponent, Node, V> {
         typedef GraphMap<MappableBpGraphComponent, Node, V> Parent;
 
       public:
         /// \brief Construct a new map.
         ///
         /// Construct a new map for the graph.
-        explicit RedMap(const MappableBpGraphComponent& graph)
+        explicit RedNodeMap(const MappableBpGraphComponent& graph)
           : Parent(graph) {}
 
         /// \brief Construct a new map with default value.
         ///
         /// Construct a new map for the graph and initalize the values.
-        RedMap(const MappableBpGraphComponent& graph, const V& value)
+        RedNodeMap(const MappableBpGraphComponent& graph, const V& value)
           : Parent(graph, value) {}
 
       private:
         /// \brief Copy constructor.
         ///
         /// Copy Constructor.
-        RedMap(const RedMap& nm) : Parent(nm) {}
+        RedNodeMap(const RedNodeMap& nm) : Parent(nm) {}
 
         /// \brief Assignment operator.
         ///
         /// Assignment operator.
         template <typename CMap>
-        RedMap& operator=(const CMap&) {
+        RedNodeMap& operator=(const CMap&) {
           checkConcept<ReadMap<Node, V>, CMap>();
           return *this;
         }
@@ -1768,33 +1769,33 @@
       /// Standard graph map for the blue nodes.
       /// It conforms to the ReferenceMap concept.
       template <typename V>
-      class BlueMap : public GraphMap<MappableBpGraphComponent, Node, V> {
+      class BlueNodeMap : public GraphMap<MappableBpGraphComponent, Node, V> {
         typedef GraphMap<MappableBpGraphComponent, Node, V> Parent;
 
       public:
         /// \brief Construct a new map.
         ///
         /// Construct a new map for the graph.
-        explicit BlueMap(const MappableBpGraphComponent& graph)
+        explicit BlueNodeMap(const MappableBpGraphComponent& graph)
           : Parent(graph) {}
 
         /// \brief Construct a new map with default value.
         ///
         /// Construct a new map for the graph and initalize the values.
-        BlueMap(const MappableBpGraphComponent& graph, const V& value)
+        BlueNodeMap(const MappableBpGraphComponent& graph, const V& value)
           : Parent(graph, value) {}
 
       private:
         /// \brief Copy constructor.
         ///
         /// Copy Constructor.
-        BlueMap(const BlueMap& nm) : Parent(nm) {}
+        BlueNodeMap(const BlueNodeMap& nm) : Parent(nm) {}
 
         /// \brief Assignment operator.
         ///
         /// Assignment operator.
         template <typename CMap>
-        BlueMap& operator=(const CMap&) {
+        BlueNodeMap& operator=(const CMap&) {
           checkConcept<ReadMap<Node, V>, CMap>();
           return *this;
         }
@@ -1815,31 +1816,37 @@
           checkConcept<MappableGraphComponent<Base>, _BpGraph>();
 
           { // int map test
-            typedef typename _BpGraph::template RedMap<int> IntRedMap;
+            typedef typename _BpGraph::template RedNodeMap<int>
+              IntRedNodeMap;
             checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, int>,
-              IntRedMap >();
+              IntRedNodeMap >();
           } { // bool map test
-            typedef typename _BpGraph::template RedMap<bool> BoolRedMap;
+            typedef typename _BpGraph::template RedNodeMap<bool>
+              BoolRedNodeMap;
             checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, bool>,
-              BoolRedMap >();
+              BoolRedNodeMap >();
           } { // Dummy map test
-            typedef typename _BpGraph::template RedMap<Dummy> DummyRedMap;
+            typedef typename _BpGraph::template RedNodeMap<Dummy>
+              DummyRedNodeMap;
             checkConcept<GraphMap<_BpGraph, typename _BpGraph::RedNode, Dummy>,
-              DummyRedMap >();
+              DummyRedNodeMap >();
           }
 
           { // int map test
-            typedef typename _BpGraph::template BlueMap<int> IntBlueMap;
+            typedef typename _BpGraph::template BlueNodeMap<int>
+              IntBlueNodeMap;
             checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, int>,
-              IntBlueMap >();
+              IntBlueNodeMap >();
           } { // bool map test
-            typedef typename _BpGraph::template BlueMap<bool> BoolBlueMap;
+            typedef typename _BpGraph::template BlueNodeMap<bool>
+              BoolBlueNodeMap;
             checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, bool>,
-              BoolBlueMap >();
+              BoolBlueNodeMap >();
           } { // Dummy map test
-            typedef typename _BpGraph::template BlueMap<Dummy> DummyBlueMap;
+            typedef typename _BpGraph::template BlueNodeMap<Dummy>
+              DummyBlueNodeMap;
             checkConcept<GraphMap<_BpGraph, typename _BpGraph::BlueNode, Dummy>,
-              DummyBlueMap >();
+              DummyBlueNodeMap >();
           }
         }
 
diff -r c8fa41fcc4a7 -r 699c7eac2c6d lemon/core.h
--- a/lemon/core.h	Thu Dec 01 09:05:47 2011 +0100
+++ b/lemon/core.h	Wed Jan 11 22:21:07 2012 +0100
@@ -150,10 +150,11 @@
 
   ///Create convenience typedefs for the bipartite graph types and iterators
 
-  ///This \c \#define creates the same convenient type definitions as defined
-  ///by \ref GRAPH_TYPEDEFS(BpGraph) and ten more, namely it creates
-  ///\c RedNode, \c RedIt, \c BoolRedMap, \c IntRedMap, \c DoubleRedMap,
-  ///\c BlueNode, \c BlueIt, \c BoolBlueMap, \c IntBlueMap, \c DoubleBlueMap.
+  ///This \c \#define creates the same convenient type definitions as
+  ///defined by \ref GRAPH_TYPEDEFS(BpGraph) and ten more, namely it
+  ///creates \c RedNode, \c RedNodeIt, \c BoolRedNodeMap,
+  ///\c IntRedNodeMap, \c DoubleRedNodeMap, \c BlueNode, \c BlueNodeIt,
+  ///\c BoolBlueNodeMap, \c IntBlueNodeMap, \c DoubleBlueNodeMap.
   ///
   ///\note If the graph type is a dependent type, ie. the graph type depend
   ///on a template parameter, then use \c TEMPLATE_BPGRAPH_TYPEDEFS()
@@ -161,15 +162,15 @@
 #define BPGRAPH_TYPEDEFS(BpGraph)                                       \
   GRAPH_TYPEDEFS(BpGraph);                                              \
   typedef BpGraph::RedNode RedNode;                                     \
-  typedef BpGraph::RedIt RedIt;                                         \
-  typedef BpGraph::RedMap<bool> BoolRedMap;                             \
-  typedef BpGraph::RedMap<int> IntRedMap;                               \
-  typedef BpGraph::RedMap<double> DoubleRedMap;                         \
+  typedef BpGraph::RedNodeIt RedNodeIt;                                 \
+  typedef BpGraph::RedNodeMap<bool> BoolRedNodeMap;                     \
+  typedef BpGraph::RedNodeMap<int> IntRedNodeMap;                       \
+  typedef BpGraph::RedNodeMap<double> DoubleRedNodeMap;                 \
   typedef BpGraph::BlueNode BlueNode;                                   \
-  typedef BpGraph::BlueIt BlueIt;                                       \
-  typedef BpGraph::BlueMap<bool> BoolBlueMap;                           \
-  typedef BpGraph::BlueMap<int> IntBlueMap;                             \
-  typedef BpGraph::BlueMap<double> DoubleBlueMap
+  typedef BpGraph::BlueNodeIt BlueNodeIt;                               \
+  typedef BpGraph::BlueNodeMap<bool> BoolBlueNodeMap;                   \
+  typedef BpGraph::BlueNodeMap<int> IntBlueNodeMap;                     \
+  typedef BpGraph::BlueNodeMap<double> DoubleBlueNodeMap
 
   ///Create convenience typedefs for the bipartite graph types and iterators
 
@@ -177,18 +178,18 @@
   ///
   ///\note Use this macro, if the graph type is a dependent type,
   ///ie. the graph type depend on a template parameter.
-#define TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph)                              \
-  TEMPLATE_GRAPH_TYPEDEFS(BpGraph);                                     \
-  typedef typename BpGraph::RedNode RedNode;                            \
-  typedef typename BpGraph::RedIt RedIt;                                \
-  typedef typename BpGraph::template RedMap<bool> BoolRedMap;           \
-  typedef typename BpGraph::template RedMap<int> IntRedMap;             \
-  typedef typename BpGraph::template RedMap<double> DoubleRedMap;       \
-  typedef typename BpGraph::BlueNode BlueNode;                          \
-  typedef typename BpGraph::BlueIt BlueIt;                              \
-  typedef typename BpGraph::template BlueMap<bool> BoolBlueMap;         \
-  typedef typename BpGraph::template BlueMap<int> IntBlueMap;           \
-  typedef typename BpGraph::template BlueMap<double> DoubleBlueMap
+#define TEMPLATE_BPGRAPH_TYPEDEFS(BpGraph)                                  \
+  TEMPLATE_GRAPH_TYPEDEFS(BpGraph);                                         \
+  typedef typename BpGraph::RedNode RedNode;                                \
+  typedef typename BpGraph::RedNodeIt RedNodeIt;                            \
+  typedef typename BpGraph::template RedNodeMap<bool> BoolRedNodeMap;       \
+  typedef typename BpGraph::template RedNodeMap<int> IntRedNodeMap;         \
+  typedef typename BpGraph::template RedNodeMap<double> DoubleRedNodeMap;   \
+  typedef typename BpGraph::BlueNode BlueNode;                              \
+  typedef typename BpGraph::BlueNodeIt BlueNodeIt;                          \
+  typedef typename BpGraph::template BlueNodeMap<bool> BoolBlueNodeMap;     \
+  typedef typename BpGraph::template BlueNodeMap<int> IntBlueNodeMap;       \
+  typedef typename BpGraph::template BlueNodeMap<double> DoubleBlueNodeMap
 
   /// \brief Function to count the items in a graph.
   ///
@@ -565,10 +566,10 @@
                        BlueNodeRefMap& blueNodeRefMap,
                        EdgeRefMap& edgeRefMap) {
         to.clear();
-        for (typename From::RedIt it(from); it != INVALID; ++it) {
+        for (typename From::RedNodeIt it(from); it != INVALID; ++it) {
           redNodeRefMap[it] = to.addRedNode();
         }
-        for (typename From::BlueIt it(from); it != INVALID; ++it) {
+        for (typename From::BlueNodeIt it(from); it != INVALID; ++it) {
           blueNodeRefMap[it] = to.addBlueNode();
         }
         for (typename From::EdgeIt it(from); it != INVALID; ++it) {
@@ -1164,10 +1165,10 @@
   ///  // Create cross references (inverse) for the edges
   ///  NewBpGraph::EdgeMap<OrigBpGraph::Edge> ecr(new_graph);
   ///  cg.edgeCrossRef(ecr);
-  ///  // Copy a red map
-  ///  OrigBpGraph::RedMap<double> ormap(orig_graph);
-  ///  NewBpGraph::RedMap<double> nrmap(new_graph);
-  ///  cg.edgeMap(ormap, nrmap);
+  ///  // Copy a red node map
+  ///  OrigBpGraph::RedNodeMap<double> ormap(orig_graph);
+  ///  NewBpGraph::RedNodeMap<double> nrmap(new_graph);
+  ///  cg.redNodeMap(ormap, nrmap);
   ///  // Copy a node
   ///  OrigBpGraph::Node on;
   ///  NewBpGraph::Node nn;
@@ -1194,8 +1195,8 @@
     typedef typename To::Arc TArc;
     typedef typename To::Edge TEdge;
 
-    typedef typename From::template RedMap<TRedNode> RedNodeRefMap;
-    typedef typename From::template BlueMap<TBlueNode> BlueNodeRefMap;
+    typedef typename From::template RedNodeMap<TRedNode> RedNodeRefMap;
+    typedef typename From::template BlueNodeMap<TBlueNode> BlueNodeRefMap;
     typedef typename From::template EdgeMap<TEdge> EdgeRefMap;
 
     struct NodeRefMap {
@@ -1352,7 +1353,7 @@
     /// the original map \c map should be the Node type of the source
     /// graph.
     template <typename FromMap, typename ToMap>
-    BpGraphCopy& redMap(const FromMap& map, ToMap& tmap) {
+    BpGraphCopy& redNodeMap(const FromMap& map, ToMap& tmap) {
       _red_maps.push_back(new _core_bits::MapCopy<From, RedNode,
                           RedNodeRefMap, FromMap, ToMap>(map, tmap));
       return *this;
@@ -1403,7 +1404,7 @@
     /// the original map \c map should be the Node type of the source
     /// graph.
     template <typename FromMap, typename ToMap>
-    BpGraphCopy& blueMap(const FromMap& map, ToMap& tmap) {
+    BpGraphCopy& blueNodeMap(const FromMap& map, ToMap& tmap) {
       _blue_maps.push_back(new _core_bits::MapCopy<From, BlueNode,
                            BlueNodeRefMap, FromMap, ToMap>(map, tmap));
       return *this;
diff -r c8fa41fcc4a7 -r 699c7eac2c6d lemon/lgf_reader.h
--- a/lemon/lgf_reader.h	Thu Dec 01 09:05:47 2011 +0100
+++ b/lemon/lgf_reader.h	Wed Jan 11 22:21:07 2012 +0100
@@ -2148,7 +2148,7 @@
   /// reads the red and blue nodes from separate sections, and these
   /// sections can contain different set of maps.
   ///
-  /// The red and blue maps are read from the corresponding
+  /// The red and blue node maps are read from the corresponding
   /// sections. If a map is defined with the same name in both of
   /// these sections, then it can be read as a node map.
   template <typename BGR>
@@ -2337,9 +2337,9 @@
       return *this;
     }
 
-    /// Add a red map reading rule to the reader.
+    /// Add a red node map reading rule to the reader.
     template <typename Map>
-    BpGraphReader& redMap(const std::string& caption, Map& map) {
+    BpGraphReader& redNodeMap(const std::string& caption, Map& map) {
       checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
       _reader_bits::MapStorageBase<Node>* storage =
         new _reader_bits::MapStorage<Node, Map>(map);
@@ -2347,13 +2347,13 @@
       return *this;
     }
 
-    /// \brief Red map reading rule
+    /// \brief Red node map reading rule
     ///
-    /// Add a red map reading rule with specialized converter to the
-    /// reader.
+    /// Add a red node map node reading rule with specialized converter to
+    /// the reader.
     template <typename Map, typename Converter>
-    BpGraphReader& redMap(const std::string& caption, Map& map,
-                          const Converter& converter = Converter()) {
+    BpGraphReader& redNodeMap(const std::string& caption, Map& map,
+                              const Converter& converter = Converter()) {
       checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
       _reader_bits::MapStorageBase<Node>* storage =
         new _reader_bits::MapStorage<Node, Map, Converter>(map, converter);
@@ -2361,9 +2361,9 @@
       return *this;
     }
 
-    /// Add a blue map reading rule to the reader.
+    /// Add a blue node map reading rule to the reader.
     template <typename Map>
-    BpGraphReader& blueMap(const std::string& caption, Map& map) {
+    BpGraphReader& blueNodeMap(const std::string& caption, Map& map) {
       checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
       _reader_bits::MapStorageBase<Node>* storage =
         new _reader_bits::MapStorage<Node, Map>(map);
@@ -2371,13 +2371,13 @@
       return *this;
     }
 
-    /// \brief Blue map reading rule
+    /// \brief Blue node map reading rule
     ///
-    /// Add a blue map reading rule with specialized converter to the
-    /// reader.
+    /// Add a blue node map reading rule with specialized converter to
+    /// the reader.
     template <typename Map, typename Converter>
-    BpGraphReader& blueMap(const std::string& caption, Map& map,
-                           const Converter& converter = Converter()) {
+    BpGraphReader& blueNodeMap(const std::string& caption, Map& map,
+                               const Converter& converter = Converter()) {
       checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
       _reader_bits::MapStorageBase<Node>* storage =
         new _reader_bits::MapStorage<Node, Map, Converter>(map, converter);
@@ -2684,7 +2684,7 @@
         while (_reader_bits::readToken(line, map)) {
           if (maps.find(map) != maps.end()) {
             std::ostringstream msg;
-            msg << "Multiple occurence of red map: " << map;
+            msg << "Multiple occurence of red node map: " << map;
             throw FormatError(msg.str());
           }
           maps.insert(std::make_pair(map, index));
@@ -2777,7 +2777,7 @@
         while (_reader_bits::readToken(line, map)) {
           if (maps.find(map) != maps.end()) {
             std::ostringstream msg;
-            msg << "Multiple occurence of blue map: " << map;
+            msg << "Multiple occurence of blue node map: " << map;
             throw FormatError(msg.str());
           }
           maps.insert(std::make_pair(map, index));
diff -r c8fa41fcc4a7 -r 699c7eac2c6d lemon/lgf_writer.h
--- a/lemon/lgf_writer.h	Thu Dec 01 09:05:47 2011 +0100
+++ b/lemon/lgf_writer.h	Wed Jan 11 22:21:07 2012 +0100
@@ -1629,7 +1629,7 @@
   /// reads the red and blue nodes from separate sections, and these
   /// sections can contain different set of maps.
   ///
-  /// The red and blue maps are written to the corresponding
+  /// The red and blue node maps are written to the corresponding
   /// sections. The node maps are written to both of these sections
   /// with the same map name.
   template <typename BGR>
@@ -1805,11 +1805,11 @@
       return *this;
     }
 
-    /// \brief Red map writing rule
+    /// \brief Red node map writing rule
     ///
-    /// Add a red map writing rule to the writer.
+    /// Add a red node map writing rule to the writer.
     template <typename Map>
-    BpGraphWriter& redMap(const std::string& caption, const Map& map) {
+    BpGraphWriter& redNodeMap(const std::string& caption, const Map& map) {
       checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
       _writer_bits::MapStorageBase<Node>* storage =
         new _writer_bits::MapStorage<Node, Map>(map);
@@ -1817,13 +1817,13 @@
       return *this;
     }
 
-    /// \brief Red map writing rule
+    /// \brief Red node map writing rule
     ///
-    /// Add a red map writing rule with specialized converter to the
+    /// Add a red node map writing rule with specialized converter to the
     /// writer.
     template <typename Map, typename Converter>
-    BpGraphWriter& redMap(const std::string& caption, const Map& map,
-                          const Converter& converter = Converter()) {
+    BpGraphWriter& redNodeMap(const std::string& caption, const Map& map,
+                              const Converter& converter = Converter()) {
       checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
       _writer_bits::MapStorageBase<Node>* storage =
         new _writer_bits::MapStorage<Node, Map, Converter>(map, converter);
@@ -1831,11 +1831,11 @@
       return *this;
     }
 
-    /// \brief Blue map writing rule
+    /// \brief Blue node map writing rule
     ///
-    /// Add a blue map writing rule to the writer.
+    /// Add a blue node map writing rule to the writer.
     template <typename Map>
-    BpGraphWriter& blueMap(const std::string& caption, const Map& map) {
+    BpGraphWriter& blueNodeMap(const std::string& caption, const Map& map) {
       checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
       _writer_bits::MapStorageBase<Node>* storage =
         new _writer_bits::MapStorage<Node, Map>(map);
@@ -1843,13 +1843,13 @@
       return *this;
     }
 
-    /// \brief Blue map writing rule
+    /// \brief Blue node map writing rule
     ///
-    /// Add a blue map writing rule with specialized converter to the
+    /// Add a blue node map writing rule with specialized converter to the
     /// writer.
     template <typename Map, typename Converter>
-    BpGraphWriter& blueMap(const std::string& caption, const Map& map,
-                           const Converter& converter = Converter()) {
+    BpGraphWriter& blueNodeMap(const std::string& caption, const Map& map,
+                               const Converter& converter = Converter()) {
       checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
       _writer_bits::MapStorageBase<Node>* storage =
         new _writer_bits::MapStorage<Node, Map, Converter>(map, converter);
@@ -2058,7 +2058,7 @@
       *_os << std::endl;
 
       std::vector<Node> nodes;
-      for (RedIt n(_graph); n != INVALID; ++n) {
+      for (RedNodeIt n(_graph); n != INVALID; ++n) {
         nodes.push_back(n);
       }
 
@@ -2118,7 +2118,7 @@
       *_os << std::endl;
 
       std::vector<Node> nodes;
-      for (BlueIt n(_graph); n != INVALID; ++n) {
+      for (BlueNodeIt n(_graph); n != INVALID; ++n) {
         nodes.push_back(n);
       }
 
diff -r c8fa41fcc4a7 -r 699c7eac2c6d test/bpgraph_test.cc
--- a/test/bpgraph_test.cc	Thu Dec 01 09:05:47 2011 +0100
+++ b/test/bpgraph_test.cc	Wed Jan 11 22:21:07 2012 +0100
@@ -101,8 +101,8 @@
   checkEdgeIds(G);
 
   checkGraphNodeMap(G);
-  checkGraphRedMap(G);
-  checkGraphBlueMap(G);
+  checkGraphRedNodeMap(G);
+  checkGraphBlueNodeMap(G);
   checkGraphArcMap(G);
   checkGraphEdgeMap(G);
 }
@@ -260,8 +260,8 @@
   checkEdgeIds(G);
 
   checkGraphNodeMap(G);
-  checkGraphRedMap(G);
-  checkGraphBlueMap(G);
+  checkGraphRedNodeMap(G);
+  checkGraphBlueNodeMap(G);
   checkGraphArcMap(G);
   checkGraphEdgeMap(G);
 
@@ -369,13 +369,13 @@
   checkGraphEdgeList(G, redNum * blueNum);
   checkGraphArcList(G, 2 * redNum * blueNum);
 
-  for (RedIt n(G); n != INVALID; ++n) {
+  for (RedNodeIt n(G); n != INVALID; ++n) {
     checkGraphOutArcList(G, n, blueNum);
     checkGraphInArcList(G, n, blueNum);
     checkGraphIncEdgeList(G, n, blueNum);
   }
 
-  for (BlueIt n(G); n != INVALID; ++n) {
+  for (BlueNodeIt n(G); n != INVALID; ++n) {
     checkGraphOutArcList(G, n, redNum);
     checkGraphInArcList(G, n, redNum);
     checkGraphIncEdgeList(G, n, redNum);
@@ -393,8 +393,8 @@
   checkEdgeIds(G);
 
   checkGraphNodeMap(G);
-  checkGraphRedMap(G);
-  checkGraphBlueMap(G);
+  checkGraphRedNodeMap(G);
+  checkGraphBlueNodeMap(G);
   checkGraphArcMap(G);
   checkGraphEdgeMap(G);
 
diff -r c8fa41fcc4a7 -r 699c7eac2c6d test/graph_copy_test.cc
--- a/test/graph_copy_test.cc	Thu Dec 01 09:05:47 2011 +0100
+++ b/test/graph_copy_test.cc	Wed Jan 11 22:21:07 2012 +0100
@@ -216,8 +216,8 @@
   // Build a graph
   SmartBpGraph from;
   SmartBpGraph::NodeMap<int> fnm(from);
-  SmartBpGraph::RedMap<int> frnm(from);
-  SmartBpGraph::BlueMap<int> fbnm(from);
+  SmartBpGraph::RedNodeMap<int> frnm(from);
+  SmartBpGraph::BlueNodeMap<int> fbnm(from);
   SmartBpGraph::ArcMap<int> fam(from);
   SmartBpGraph::EdgeMap<int> fem(from);
   SmartBpGraph::Node fn = INVALID;
@@ -261,8 +261,8 @@
   // Test graph copy
   GR to;
   typename GR::template NodeMap<int> tnm(to);
-  typename GR::template RedMap<int> trnm(to);
-  typename GR::template BlueMap<int> tbnm(to);
+  typename GR::template RedNodeMap<int> trnm(to);
+  typename GR::template BlueNodeMap<int> tbnm(to);
   typename GR::template ArcMap<int> tam(to);
   typename GR::template EdgeMap<int> tem(to);
   typename GR::Node tn;
@@ -272,19 +272,20 @@
   typename GR::Edge te;
 
   SmartBpGraph::NodeMap<typename GR::Node> nr(from);
-  SmartBpGraph::RedMap<typename GR::RedNode> rnr(from);
-  SmartBpGraph::BlueMap<typename GR::BlueNode> bnr(from);
+  SmartBpGraph::RedNodeMap<typename GR::RedNode> rnr(from);
+  SmartBpGraph::BlueNodeMap<typename GR::BlueNode> bnr(from);
   SmartBpGraph::ArcMap<typename GR::Arc> ar(from);
   SmartBpGraph::EdgeMap<typename GR::Edge> er(from);
 
   typename GR::template NodeMap<SmartBpGraph::Node> ncr(to);
-  typename GR::template RedMap<SmartBpGraph::RedNode> rncr(to);
-  typename GR::template BlueMap<SmartBpGraph::BlueNode> bncr(to);
+  typename GR::template RedNodeMap<SmartBpGraph::RedNode> rncr(to);
+  typename GR::template BlueNodeMap<SmartBpGraph::BlueNode> bncr(to);
   typename GR::template ArcMap<SmartBpGraph::Arc> acr(to);
   typename GR::template EdgeMap<SmartBpGraph::Edge> ecr(to);
 
   bpGraphCopy(from, to).
-    nodeMap(fnm, tnm).redMap(frnm, trnm).blueMap(fbnm, tbnm).
+    nodeMap(fnm, tnm).
+    redNodeMap(frnm, trnm).blueNodeMap(fbnm, tbnm).
     arcMap(fam, tam).edgeMap(fem, tem).
     nodeRef(nr).redRef(rnr).blueRef(bnr).
     arcRef(ar).edgeRef(er).
@@ -304,7 +305,7 @@
     check(fnm[it] == tnm[nr[it]], "Wrong copy.");
   }
 
-  for (SmartBpGraph::RedIt it(from); it != INVALID; ++it) {
+  for (SmartBpGraph::RedNodeIt it(from); it != INVALID; ++it) {
     check(ncr[nr[it]] == it, "Wrong copy.");
     check(fnm[it] == tnm[nr[it]], "Wrong copy.");
     check(rnr[it] == nr[it], "Wrong copy.");
@@ -313,7 +314,7 @@
     check(to.red(rnr[it]), "Wrong copy.");
   }
 
-  for (SmartBpGraph::BlueIt it(from); it != INVALID; ++it) {
+  for (SmartBpGraph::BlueNodeIt it(from); it != INVALID; ++it) {
     check(ncr[nr[it]] == it, "Wrong copy.");
     check(fnm[it] == tnm[nr[it]], "Wrong copy.");
     check(bnr[it] == nr[it], "Wrong copy.");
@@ -343,11 +344,11 @@
   for (typename GR::NodeIt it(to); it != INVALID; ++it) {
     check(nr[ncr[it]] == it, "Wrong copy.");
   }
-  for (typename GR::RedIt it(to); it != INVALID; ++it) {
+  for (typename GR::RedNodeIt it(to); it != INVALID; ++it) {
     check(rncr[it] == ncr[it], "Wrong copy.");
     check(rnr[rncr[it]] == it, "Wrong copy.");
   }
-  for (typename GR::BlueIt it(to); it != INVALID; ++it) {
+  for (typename GR::BlueNodeIt it(to); it != INVALID; ++it) {
     check(bncr[it] == ncr[it], "Wrong copy.");
     check(bnr[bncr[it]] == it, "Wrong copy.");
   }
diff -r c8fa41fcc4a7 -r 699c7eac2c6d test/graph_test.h
--- a/test/graph_test.h	Thu Dec 01 09:05:47 2011 +0100
+++ b/test/graph_test.h	Wed Jan 11 22:21:07 2012 +0100
@@ -43,7 +43,7 @@
   template<class Graph>
   void checkGraphRedNodeList(const Graph &G, int cnt)
   {
-    typename Graph::RedIt n(G);
+    typename Graph::RedNodeIt n(G);
     for(int i=0;i<cnt;i++) {
       check(n!=INVALID,"Wrong red Node list linking.");
       check(G.red(n),"Wrong node set check.");
@@ -65,7 +65,7 @@
   template<class Graph>
   void checkGraphBlueNodeList(const Graph &G, int cnt)
   {
-    typename Graph::BlueIt n(G);
+    typename Graph::BlueNodeIt n(G);
     for(int i=0;i<cnt;i++) {
       check(n!=INVALID,"Wrong blue Node list linking.");
       check(G.blue(n),"Wrong node set check.");
@@ -225,7 +225,7 @@
   void checkRedNodeIds(const Graph& G) {
     typedef typename Graph::RedNode RedNode;
     std::set<int> values;
-    for (typename Graph::RedIt n(G); n != INVALID; ++n) {
+    for (typename Graph::RedNodeIt n(G); n != INVALID; ++n) {
       check(G.red(n), "Wrong partition");
       check(values.find(G.id(n)) == values.end(), "Wrong id");
       check(G.id(n) <= G.maxRedId(), "Wrong maximum id");
@@ -238,7 +238,7 @@
   void checkBlueNodeIds(const Graph& G) {
     typedef typename Graph::BlueNode BlueNode;
     std::set<int> values;
-    for (typename Graph::BlueIt n(G); n != INVALID; ++n) {
+    for (typename Graph::BlueNodeIt n(G); n != INVALID; ++n) {
       check(G.blue(n), "Wrong partition");
       check(values.find(G.id(n)) == values.end(), "Wrong id");
       check(G.id(n) <= G.maxBlueId(), "Wrong maximum id");
@@ -304,17 +304,17 @@
   }
 
   template <typename Graph>
-  void checkGraphRedMap(const Graph& G) {
+  void checkGraphRedNodeMap(const Graph& G) {
     typedef typename Graph::Node Node;
-    typedef typename Graph::RedIt RedIt;
+    typedef typename Graph::RedNodeIt RedNodeIt;
 
-    typedef typename Graph::template RedMap<int> IntRedMap;
-    IntRedMap map(G, 42);
-    for (RedIt it(G); it != INVALID; ++it) {
+    typedef typename Graph::template RedNodeMap<int> IntRedNodeMap;
+    IntRedNodeMap map(G, 42);
+    for (RedNodeIt it(G); it != INVALID; ++it) {
       check(map[it] == 42, "Wrong map constructor.");
     }
     int s = 0;
-    for (RedIt it(G); it != INVALID; ++it) {
+    for (RedNodeIt it(G); it != INVALID; ++it) {
       map[it] = 0;
       check(map[it] == 0, "Wrong operator[].");
       map.set(it, s);
@@ -322,7 +322,7 @@
       ++s;
     }
     s = s * (s - 1) / 2;
-    for (RedIt it(G); it != INVALID; ++it) {
+    for (RedNodeIt it(G); it != INVALID; ++it) {
       s -= map[it];
     }
     check(s == 0, "Wrong sum.");
@@ -334,17 +334,17 @@
   }
 
   template <typename Graph>
-  void checkGraphBlueMap(const Graph& G) {
+  void checkGraphBlueNodeMap(const Graph& G) {
     typedef typename Graph::Node Node;
-    typedef typename Graph::BlueIt BlueIt;
+    typedef typename Graph::BlueNodeIt BlueNodeIt;
 
-    typedef typename Graph::template BlueMap<int> IntBlueMap;
-    IntBlueMap map(G, 42);
-    for (BlueIt it(G); it != INVALID; ++it) {
+    typedef typename Graph::template BlueNodeMap<int> IntBlueNodeMap;
+    IntBlueNodeMap map(G, 42);
+    for (BlueNodeIt it(G); it != INVALID; ++it) {
       check(map[it] == 42, "Wrong map constructor.");
     }
     int s = 0;
-    for (BlueIt it(G); it != INVALID; ++it) {
+    for (BlueNodeIt it(G); it != INVALID; ++it) {
       map[it] = 0;
       check(map[it] == 0, "Wrong operator[].");
       map.set(it, s);
@@ -352,7 +352,7 @@
       ++s;
     }
     s = s * (s - 1) / 2;
-    for (BlueIt it(G); it != INVALID; ++it) {
+    for (BlueNodeIt it(G); it != INVALID; ++it) {
       s -= map[it];
     }
     check(s == 0, "Wrong sum.");